in reply to Re: Matching an JavaScript object initalizer regex
in thread Matching an JavaScript object initalizer regex

Thanks for the response. The regex looked promising, but unfortunately, when run on my sample test cases, the regex matches less that the original regex did...

It doesn't seem to work on the simple ones like:

var objRegex = /"/; var objRegex = /123[abc]456/; var objRegex = /te'st\/as"df/;
Of course, this is almost out of my league now (it took me quite a while just to grasp the original one)...

Replies are listed 'Best First'.
Re: Re: Re: Matching an JavaScript object initalizer regex
by japhy (Canon) on Feb 15, 2002 at 00:10 UTC
    Sorry! I left out the ^ in my character class. I've updated it.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a (from-home) job
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      I have verified that your regex does exactly the parsing required in this thread! It's amazing to comprehend the power of Perl and Regex... That one little regex (although not a simple one) could parse all test cases of complex JavaScript (and thus Perl) regular expressions... You're good.... +++++ to you my friend ;)