- or download this
/foo(?!.*foo)/
- or download this
s/(?<=foo)/,/g; # Without lookbehind: s/foo/foo,/g or s/(foo)/$1,/g
- or download this
s/(?<=look)(?=ahead)/-/g;
- or download this
/foo # Match starting at foo
( # Capture
...
) # End capture
bar # and ending at bar
/x;
- or download this
s/(?<=, # after a comma,
(?! # but not matching
...
(?=\d) # digit afterward
)
)/ /gx; # substitute a space
- or download this
s/(?<=, # after a comma, but either
(?:
...
(?!\d) # not matching digit afterward
)
)/ /gx; # substitute a space
- or download this
print "$1\n" while /(?=(.*))/g;