Sunday, March 20, 2011

how to do an OR on two words in a regular expression

Hi,

I want to write a regex that matches either:

insert #TempTable

or

update #TempTable

How do I do it? I guess an imperfect way to go about it would be:

[insertupda]{6} #TempTable

While this does work in my situation, i want to know the right way to do this.

Thanks :)

From superuser
  • (insert|update) #TempTable
    

0 comments:

Post a Comment