> I am doing this on the basis that all functions have a
opening and
> closing bracket ( { } ) with x amount of opening and
closing brackets
> between them.
>
> I have factored that comments may contain { } chars and
so strip them
> from the input.
>
> However, how would I be able to factor that the { }
characters may be
> contained as a string literal such as var s='}'; ?
Can't be done with a single regular expression. You'll
need 4, one for
{, one for }, one for comments, and one for strings.
See http://www.regular-expressions.info/examplesprogramme
r.html
Kind regards,
Jan Goyvaerts
--
Get your copy of RegexBuddy at http://www.regexbuddy.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|