One easy way to handle your original problem (without the delim in the output) would be to use
@out = split /~/, $stringNow, since you want the tilde as well, you could simply append ~ to the end of each substring returned by split
@out = map {$_ .= "~"} split /~/, $stringOf course, there would be some edge cases to take care of; I didn't test this all that much. I'm a big fan of regex btw, but TIMTOWTDI
UPDATE: Didn't look closely at solution offered by wind. That's neat!In reply to Re: regex replacement help
by jaimon
in thread regex replacement help
by mkenney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |