I am working on a simple translator from SQL INSERT statements to an XML dataset file that will be used with DbUnit .
My current definition is as follows:
def t_INSERT(token):
r'INSERT\s+INTO'
return token
Now I want to support insensitive SQL command register, for example, take all INSERT INTO, INSERT INTO, INSERT INTOand INSERT INTOas one and the same.
I wonder if there is a PLY way to use re.Iit to ignore the case or another alternative to writing a rule that I am not familiar with.
elias source
share