s{ ( [ ] ) | ( [^\w ] ) }{ defined( $1 ) ? $special_chars_re_class : "\\$2" }egr;
I think this needs the /x modifier to work as advertised.
Give a man a fish: <%-{-{-{-<
In reply to Re^2: How to replace spaces with different chars?
by AnomalousMonk
in thread How to replace spaces with different chars?
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |