in reply to Re^4: RegEx for OpenOffice::OODoc as in $doc->selectElementsByContent()
in thread RegEx for OpenOffice::OODoc as in $doc->selectElementsByContent()
It looks like you may have missed the parens in the example choroba posted above.
# fail (no parens in regex assignment) perl -wMstrict -E 'my $x="Faith"; my $r=q{?i:faith}; say "ok" if $x =~ + /$r/' Quantifier follows nothing in regex; marked by <-- HERE in m/? <-- HER +E i:faith/ at -e line 1. # success perl -wMstrict -E 'my $x="Faith"; my $r=q{(?i:faith)}; say "ok" if $x +=~ /$r/' ok
So instead of '?i:faith' which I'm guessing you have, try '(?i:faith)'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: RegEx for OpenOffice::OODoc as in $doc->selectElementsByContent()
by EigenFunctions (Beadle) on Jun 03, 2016 at 22:00 UTC | |
by RonW (Parson) on Jun 03, 2016 at 22:16 UTC | |
by AnomalousMonk (Archbishop) on Jun 04, 2016 at 02:36 UTC | |
by EigenFunctions (Beadle) on Jun 04, 2016 at 20:31 UTC | |
by stevieb (Canon) on Jun 04, 2016 at 00:10 UTC | |
by EigenFunctions (Beadle) on Jun 04, 2016 at 20:37 UTC |