Hi all,
I want a regex used in Perl which is
@ret = $query =~ /(googl.?)|(.?oogle)/;
if the $query is "google", then will be matched, and the @ret = (google,
undef), $1 = "google", $2 is undef
but I want result like @ret = (google, google), because the
pattern "(.?oogle)" is matched too,
And my regex is very long (the regex above is just an example), maybe
thouands of "|", so if separate the regex to /(googl.?)/ and /(.?oogle)/
will be inefficient.
Does anybody can help me? Thanks!