in reply to Re: Regex help
in thread Regex help

I would say that split is probably a more appropriate tool than regular expressions.

Not trying to start an argument, but doesn't split use a regular expression ("pattern") as its first parameter?

Replies are listed 'Best First'.
Re^3: Regex help
by kennethk (Abbot) on Jun 21, 2012 at 14:39 UTC
    From a pedantic perspective, yes, split uses a regular expression to determine how to break up the string. However in my experience, "using regular expressions" in common usage is generally taken to mean using the bare expression for matching, capturing or substitution.

    So you are technically correct - the best kind of correct.


    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.