lobs has asked for the wisdom of the Perl Monks concerning the following question:
$currentSentence =~ s/[\ba\b|\ban\b|\bthe\b]//g;
if($currentSentence =~ /([\S]+) ([\S]+) <head>lines?<\/head>/) { if ($2 =~ /[\ba\b|\ban\b|\bthe\b]/) { print "$2\n"; print $DST "$1"; } else { print $DST "$2"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expression, substitution
by atcroft (Abbot) on Apr 06, 2016 at 01:44 UTC | |
by lobs (Acolyte) on Apr 06, 2016 at 02:38 UTC | |
|
Re: Regular Expression, substitution
by AnomalousMonk (Archbishop) on Apr 06, 2016 at 04:50 UTC | |
|
Re: Regular Expression, substitution
by Marshall (Canon) on Apr 06, 2016 at 01:42 UTC | |
|
Re: Regular Expression, substitution
by marinersk (Priest) on Apr 06, 2016 at 03:31 UTC | |
by GrandFather (Saint) on Apr 06, 2016 at 03:57 UTC | |
by AnomalousMonk (Archbishop) on Apr 06, 2016 at 05:10 UTC | |
by marinersk (Priest) on Apr 06, 2016 at 04:47 UTC |