depending on your textfile this can be indefinitely complex.
are parens ever nested?
is it always (L \d+ W \d+)?
If it's not a fix format I would try to match every parens-pair, and call a function with the match with /e modifier. s/\(.*?\)/kill_LW($&)/ge
In reply to Re: regex related...search and delete
by The Perlman
in thread regex related...search and delete
by freekngeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |