You forgot to mention what's not working
In your case it is a missing line
__DATA__
right before the example data, and a regex you might change to
s/<([^>]*)>/\{$1\}\n/g;
or alternatively
s/<(.*?)>/\{$1\}\n/g;
Note that this is probably still short of what you want, since you seem to need to throw away ending tags. In that case you could add '/' to the character class above and throw away the ending tags in a second regex
In reply to Re: replace string
by jethro
in thread replace string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |