Regex Regular expression - Include parentheses in place of quotation marks

1

How do I change the quotation marks for a tag? working to convert (* .dml -> delphi form) where something that was as text becomes list (stringlist).

Text Example:

CommandText = 'SELECT * FROM PRODUTOS'

We want to convert to

SQL.Text = ('SELECT * FROM PRODUTOS')

Note that we have to include the parentheses of Start (and end). Leaving the quotation marks.

How could this expression from Regex NOTE: I will use it to do TSimpleDataSet migration

    
asked by anonymous 27.10.2017 / 17:42

1 answer

0

I do not know much about Delphi, but I took a look. The regex seems to be simple if all its variables have this name (there were more examples missing).
CommandText = '(.*)'
The command would be TRegEx.Replace(string, 'CommandText = ''(.*)'' ', 'SQL.Text = ('''')')
Example

    
28.10.2017 / 22:30