in reply to Regex Question
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.
|
|---|