G
Guest
Hi,
I have been struggling with the most clear and efficient solution to the
following:
I have a SELECT string that may contain a call to the CONVERT() function call.
This call may have 2 or 3 arguments and some of these arguments could also
have their own function calls, like so;
CONVERT( char(32), LOWER(dep.RecordDate))
I need to extract the entire parameters, which would be so simple if there
were no embedded parenthesis in the parameters.
Thus I would like to have something like:
Match m = RegEx.XXXX(...);
m.Groups[1].Value => char(32) and
m.Groups[2].Value => LOWER(dep.RecordDate)
Is this possible using a single regular expression? (I could of course parse
first to determine the number of parameters and their positions and from
there obtain the information I need, but I have a feeling, from what I have
seen, that RegEx is much more powerful, and I would like to take the
oportunity to better learn to use this power.
Any comments?
I have been struggling with the most clear and efficient solution to the
following:
I have a SELECT string that may contain a call to the CONVERT() function call.
This call may have 2 or 3 arguments and some of these arguments could also
have their own function calls, like so;
CONVERT( char(32), LOWER(dep.RecordDate))
I need to extract the entire parameters, which would be so simple if there
were no embedded parenthesis in the parameters.
Thus I would like to have something like:
Match m = RegEx.XXXX(...);
m.Groups[1].Value => char(32) and
m.Groups[2].Value => LOWER(dep.RecordDate)
Is this possible using a single regular expression? (I could of course parse
first to determine the number of parameters and their positions and from
there obtain the information I need, but I have a feeling, from what I have
seen, that RegEx is much more powerful, and I would like to take the
oportunity to better learn to use this power.
Any comments?