i am new on Regular Expression.
I will test a String, wheter it is valid with a regular expression.
MY String is following:
`Select * from xddf_db.yyy_tte where adress = '[PARAM]' and surename like '%[ABC]'` .... can several times on the end with and/or
It can begin als with Select name must not with *
`Select Name` .....
The important is that the bracket fields should begin and end with '[sdf]' or never with apostroph for exampe [sdf] that is correct too. But it is not allowed to begin with apostroph and not end. For example '[asd] That should wrong.
The underline charcters "_" can in it but not must.
It is correct between/ Or not with apostroph. The fields can have have one percent symbol(it is for Like function). For Example it is correct '%[asd]' or %[asd]& correct toobe . That is correct too '[asd]%' but that is wrong: '%%[sdđ]%' . Only one it is allowed. I hope you can help we with this hard expression.
Here is the list:
Allowed:
Select * from xddf_db.yyy_tte where adress = '[PARAM]' and surename like '%[ABC]'
Select * from xddf_db.yyy_tte where adress = '[PARAM]' and surename like '%[ABC]&'
Select * from xddf_db.yyy_tte where adress = '[PARAM]' and surename like '[ABC]&'
Select Name from xddfdb.yyy where adress = '[PARAM]' and surename_abc ='[ABC]'
Select Name from xddfdb.yyy where adress = '[PARAM]' and surename_abc =[ABC]
Select * from xddfdb.yyy_tte where adress = '[PARAM]' and surename_abc =[ABC]
Select * from xddfdb.yyy_tte where adress = '[PARAM]' and surename_abc =[ABC] or post_dd like '%[ABC]'
Select * from xddfdb.yyy_tte where adress = '[PARAM]' and surename_abc =[ABC] or post_dd < [ABC] and post_dd > [ABD]
WRONG
Select * from xddfdb.yyy_tte where adress = [PARAM]' and surename_abc = '[ABC]
Select * from xddf_db.yyy_tte where adress = '[PARAM]' and surename like '%[ABC]&&'
Select Name from xddf_db.yyy_tte where adress = '[PARAM]' and surename like '%&[ABC]&&'