regex - Processing text of SQL script -


I want to develop tools which will cover SQL scripts - all special words and commands (select, join , From, etc.). Upper lower; Add square brackets; And some other things (yes,) I'm going to implement it as an extension of my IDE or external device - I have not been decided yet.

I was going to split a script from spaces, brackets, commas, and periods - different words - and check each word to match the keyword. If it matches - then capitalize the word / lowercase by the settings-if not, then leave it.

But then I thought it could be another solution.

I'm RegEx (Unfortunately I do not know much about it). I think this will work more efficiently and so it will be more like.

Is RegEx the best way to achieve my goal? Or is my initial approach also reasonable?

Is there any other way?

P.S. I know that similar devices already exist. And if you share them I would appreciate it. But I want to implement my own tool for self-education reasons.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -