Anyway, the shortest command in Perl that'll do what you ask for, is:
which does an inplace replacement, deleting all characters that are not one of those four.tr/zvxg//cd
In reply to Re: extract sequences of certain letters and assign it to a variable
by bart
in thread extract sequences of certain letters and assign it to a variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |