For the first line: most characters do not need escaping in a character class, probably only '-' and ']'.
For the second line: coming soon to a perl near you:
% perl -wle 'use builtin qw{trim}; $s=" foo bar "; $s=trim($s); print +"<$s>"' Built-in function 'builtin::trim' is experimental at -e line 1. <foo bar> %
In reply to Re: Is there a way to make these two regex lines cleaner?
by hv
in thread Is there a way to make these two regex lines cleaner?
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |