use strict; use warnings; my $string = '(abc),(def),(ghi)'; my $substitution = 's/\),\(/\)\n\(/gi'; $_ = $string; eval "$substitution"; print;
OUTPUT:
(abc) (def) (ghi)
In reply to Re: Regex stored in a scalar
by BillKSmith
in thread Regex stored in a scalar
by OtakuGenX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |