use strict;
my $str = 'https://lingojam.com/edit/02db819202047a0e482ab768cd7baec9
###name, Name of your translator...:
IRC Server Now Understands Voice
###subtitle, Subtitle (optional):
The Only Way
###language1, Language1 name...:
Antonio Rodriguez Jr. Command To Anything
###language2, Language2 name...:
Antonio Rodriguez Jr. Is Now Heard, Seen, Felt, Sense, And Vice Verca
###description, Description...:
import java.util.Scanner
Scanner stdin = new Scanner(System.in)
public class Command
{
public static void main(String[] args)
{
System.out.println("Command:");
}
###email, Admin email (optional)...:
wonderfulyanderful@gmail.com
###phrases1, Language1...:
###phrases2, Language2...:
###words1, Language1...:
###words2, Language2...:
###intraword1, Language1...:
###intraword2, Language2...:
###prefixes1, Language1...:
###prefixes2, Language2...:
###suffixes1, Language1...:
###suffixes2, Language2...:
###regex1, Replace this...:
###regex2, with this...:
###rev_regex1, Replace this...:
###rev_regex2, with this...:
###ordering1, Language1...:
###ordering2, Language2...:
###defaulttext, One random default text string per line...:
###disable-reverse, :
on
###custom-script, Define your functions here...:
###title-extra, e.g. \'(and reverse translation)\':
###background-image-source, http://example.com/my_image.png:
###title-font-name, Name of custom font...:
###title-font-size, Size of title (default=5.5)...:
###language1-font, Language1 font...:
###language2-font, Language2 font...:
###language1-font-size, Language1 font size (default=24)...:
###language2-font-size, Language2 font size (default=24)...:
';
my $regex = qr/me/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