use strict;
my $str = 'ref #629
Ref #629
ref specification#629
Ref specification#629
ref https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref https://gitlab.com/volterra/ves.io/specifications/-/issues/629
ref gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref gitlab.com/volterra/ves.io/specifications/-/issues/629
ref: #629
Ref: #629
ref: specification#629
Ref: specification#629
ref: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
ref: gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref: gitlab.com/volterra/ves.io/specifications/-/issues/629
closes #629
Closes #629
closes specification#629
Closes specification#629
closes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
closes gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes gitlab.com/volterra/ves.io/specifications/-/issues/629
closes: #629
Closes: #629
closes: specification#629
Closes: specification#629
closes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
closes: gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes: gitlab.com/volterra/ves.io/specifications/-/issues/629
related #629
Related #629
related specification#629
Related specification#629
related https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Related https://gitlab.com/volterra/ves.io/specifications/-/issues/629
related gitlab.com/volterra/ves.io/specifications/-/issues/629
Related gitlab.com/volterra/ves.io/specifications/-/issues/629
related: #629
Related: #629
related: specification#629
Related: specification#629
related: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Related: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
related: gitlab.com/volterra/ves.io/specifications/-/issues/629
Related: gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes #629
Fixes #629
fixes specification#629
Fixes specification#629
fixes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes: #629
Fixes: #629
fixes: specification#629
Fixes: specification#629
fixes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes: gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes: gitlab.com/volterra/ves.io/specifications/-/issues/629
partial #629
Partial #629
partial specification#629
Partial specification#629
partial https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial https://gitlab.com/volterra/ves.io/specifications/-/issues/629
partial gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial gitlab.com/volterra/ves.io/specifications/-/issues/629
partial: #629
Partial: #629
partial: specification#629
Partial: specification#629
partial: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
partial: gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial: gitlab.com/volterra/ves.io/specifications/-/issues/629
noref
';
my $regex = qr`^(([Rr]ef|[Cc]loses|[Rr]elated|[Ff]ixes|[Pp]artial)(:|) (#\d+|\w+\#\d+|(https://|)gitlab.com/volterra/.*/issues/\d+))|noref$`mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html