Regex Issue - Nested Matches?

Senoska

Member
Joined
Jun 27, 2006
Messages
15
Programming Experience
Beginner
Hey everyone. Sorry if this is in the wrong forum. After, no joke, 2 weeks of wrestling this problem I have finally given up, defeated.

I'm currently writing a macro system, and need to be able to match things in the params of the called macro.

So for example, assume someone types this:
#MACRO("This, "is", a, test", Object1)

I can match the macro no problem, and have named captures so I'd be working specifically with this string :
"This, "is", a, test", Object1
I'm looking to ignore everything inside of the ""'s and only focus on the comma spliting the params. I'm not too good with regex. Decent enough to do simple things, but this is a little more complex than I can understand. Keep in mind users may type in several different things.
eg:
#MACRO("This, "is", a, test", Object1, "And he said, "Let there be french fries!", and it was good")

I'm looking to match just the "," splitting params.

Hopefully I've explained my issue well enough. Can any of you help? I got customers breathing down my neck to finish this app and this has delayed me long enough.
 
Last edited:
Back
Top