K
Ken Sington
i have these arbitary strings
"YaaaY" and "123YaaaY"
I'm having trouble matching only if "aaa" exist between Ys without
having 123 preceeding it.
example:
"YaaaY" --> pass
" YaaaY " --> pass
"XXXYaaaYXXX" --> pass
"alskdjlkajf 123YaaaY laskdjf" --> fail
my one liner didn't work
$x =~ s/(!\123)(Y)(a{3})(Y)/$1$2$3$4/g;
the ! doesn't seem to negate it.
for an extra bonus, how about if I wanted "aaa" to go between "[" and
"]"? or ( and )?
what don't I see here??
"YaaaY" and "123YaaaY"
I'm having trouble matching only if "aaa" exist between Ys without
having 123 preceeding it.
example:
"YaaaY" --> pass
" YaaaY " --> pass
"XXXYaaaYXXX" --> pass
"alskdjlkajf 123YaaaY laskdjf" --> fail
my one liner didn't work
$x =~ s/(!\123)(Y)(a{3})(Y)/$1$2$3$4/g;
the ! doesn't seem to negate it.
for an extra bonus, how about if I wanted "aaa" to go between "[" and
"]"? or ( and )?
what don't I see here??