- or download this
$name =~ s/(^|\s)
C
...
O
(\s|$)
/ % /xgi;
- or download this
$field =~ s/(?<!\d) # not preceeded by digits
(?:\\|\/) # back or forward slash
(?!\d) # not succeeded by digits
/ & /xg; # replace with '&' (globally)
- or download this
$field =~ s/(?:^|[^A-Z])
([A-Z])\/
...
([A-Z])
(?:[^A-Z]|$)
/ $1$2$3 /xig;