On Fri, Dec 6, 2019, 4:00 PM Bart Smissaert <bart.smissa...@gmail.com>
wrote:

> Have table with SQL statements and these statements may have comments,
> starting with /*
> How do I select the part of this statement starting with the last /*  ?
> So if the statement is:
> select field1 /*comment 1 */ from table1 /*comment 2*/
> I would like to get:
> /*comment 2*/


Is there more format to the comment than just plain text?

My senior project was a SQLite helper that would read a bunch of statements
from a sql script and create classes to automate the boilerplate code and
ensure they were prepareable. To accomplish this I needed some new syntax
that wouldn't interfere with SQLite, so I embedded it in comments, but they
had to conform to a simple structure so that I could find them via regex.

Perhaps, if it is only the last comment you care about, you could use a
regex. I'm on a phone right now and don't want to try to type in valid
regex strings, but that would be useful I could help with it when I'm near
a real keyboard.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to