>From my own experience; if you are trying to parse ANY SQL statement that someone might enter, then NO, regex alone is not going to be your solution. If on the other hand you are dealing with a relatively small subset of SQL statements, maybe SELECT, UPDATE, DELETE, then regex would be able to very quickly break these down into table/column names and values, etc etc.
Because SQL is so structured and strict (more so say than the 4.0 version of html which is fairly loose in what it allows) it does lend itself to be manipulated with regex. HTH On Sun, Dec 30, 2012 at 3:02 PM, Peter Haworth <p...@lcsql.com> wrote: > Thanks Mark, more good resources. > > A question in the back of my mind now that I know enough about regexp to be > dangerous. Is parsing a language something that can be done with regular > expressions? I have a program in which I jumped though all sorts of hoops > to parse SQL statements. It works quite well but maintaining it is a pain. > It feels like I could use regexps to separate the various "clauses" of a > command, followed by other regexps to parse those clauses depending on > type. > > Pete > lcSQL Software <http://www.lcsql.com> > > > On Sat, Dec 29, 2012 at 7:47 PM, Mark Laffoon <mark.laff...@gmail.com > >wrote: > > > I've always found RegExhibit from > > http://roger-jolly.nl/software/#regexhibithelpful. > > Also, for reference material, http://www.regular-expressions.info/ has > > been of great help. > > > > Just my 2 cents. > > Mark > > > > > > -- > > I am CDO. This is a lot like OCD, except the letters are in alphabetical > > order... as they should be. > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode