in reply to RegEx Perl Newbie Question

Howdy discoTab, welcome to the Monastery!

This is a frequently-asked question, so it's got its own answer in one of FAQs, specifically perlfaq4: How can I split a [character]-delimited string except when inside [character]? (I'd link to it, but Perlmonks' link syntax does not play nicely with fragments that contain square brackets.) Your best bet is to use Text::ParseWords, a core module that comes with Perl.

Replies are listed 'Best First'.
Re^2: RegEx Perl Newbie Question
by Athanasius (Archbishop) on Aug 19, 2014 at 02:37 UTC

        Well, it works fine for me in Google Chrome, so I didn’t think to test it in other browsers. :-(

        Works fine also in Internet Explorer 11, but in Firefox 31.0 it just takes me to perlfaq4. I’m not sure if that qualifies as a broken link, so I’m guessing you are using yet another browser?

        Thanks for the link. I don’t know what “pmbk” refers to (and Messrs. Google and Super Search have left me none the wiser).

        Update: Corion suggests “pmbk” may mean “PerlMonks bookmark”, referring to the JavaScript snippet. Makes sense.

        Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      Neat, thanks! I'd tried the HTML entities the Monastery usually requires for literal square brackets (which did not work), but for some reason I'd not thought of using percent-encoding. Another trick learned! (And who says you can't teach an old pony new tricks?)