I have the following sql queries I'd like to be able to group in one regular expression:
CREATE INDEX blah_idx ON blah (id ASC)
CREATE INDEX blah2_idx ON blah2 (foo ASC, id DEC)
I'd like to be able to use a java regex to group these so that I get:
blah_idx, blah, id, ASC
blah2_idx, blah2, foo, ASC, id, DEC
I can get the first with CREATE INDEX (\\\w+) ON (\\\w+) \\((\w+) (\w+) \\) but I'd like to be able to also group the second but I can't see to define \\((\w+) (\w+) \\) to match repeatedly.
Is this even possible?