in reply to Re: Re: regular expression (search and destroy)
in thread regular expression (search and destroy)

I cannot enumerate all the difficulties associated with trying to parse a string where delimiters between quotes should be treated as text and not delimiters. But here are a few problems...

Those reasons and others make it much better to parse such entities using a "balanced text" module. And what sauok was telling you was that Text::Balanced is a "core" module, meaning, a module that if you have Perl, you have that module already, without waiting for a sysadmin to install it.

And what others have also suggested is that even if you can't use a CORE module (a module that comes with Perl, just like stdio.h comes with C), at very least you can use your web browser to view the source of a module, on the CPAN website. Then, you can have a look at what tools are used to accomplish your objective.

Otherwise, you're wasting your efforts and building a broken solution.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein
  • Comment on Re: Re: Re: regular expression (search and destroy)