Second, try:
The /e should cause the right-hand side of the s// to be evaluated as a symbolic reference. the ? after the * makes it non-greedy, leaving a space.$line=s/~\s*([^~]*?) ~/$$1/ge;
In reply to Re: Regex grabs too much
by swiftone
in thread Regex grabs too much
by raflach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |