in reply to Multiple Regex, it works but it aint clever

I guess you're trying to shorten & standardise equity names, so it doesn't really matter what the issue price was, so you could merge all your EUR lines into one:  s/( EUR\d*)[^,]+//. Same for CHF, Y etc.

As for the dollar currencies, mind out because at the moment I think you've forgotten to escape a $ sign in $long =~s/\s+$//g;. I think you could catch all of 'em--C$, AU$, plain $, etc--with something like s/([\s+]?\$)[^,]+//g. (This may not be exactly right, but perhaps another helpful monk could put it right if it's not).

HTH

Replies are listed 'Best First'.
Re: Re: Multiple Regex, it works but it aint clever
by {NULE} (Hermit) on Aug 06, 2002 at 12:51 UTC
    Chances are that $long =~s/\s+$//g; is there to remove trailing white-space. Of course the g modifier is a bit pointless.

    {NULE}
    --
    http://www.nule.org

Re: Re: Multiple Regex, it works but it aint clever
by alexiskb (Acolyte) on Aug 06, 2002 at 13:37 UTC
    perfect, thank you kindly monks!