Roy Johnson’s technique, used only for the skipping part, produces the desired result:
$name =~ s{ (?<!C(?=.O)) # doesn't match C-something-O starting at previous ch +aracter (?<!\d) # not preceeded by digits (?:\\|\/) # back or forward slash (?!\d) # not succeeded by digits } { & }xg; # replace with '&' (globally)
Makeshifts last the longest.
In reply to Re: Regex Question
by Aristotle
in thread Regex Question
by shemp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |