Very simple regex not working

Posted by Thomas Wanner on Stack Overflow See other posts from Stack Overflow or by Thomas Wanner
Published on 2010-03-30T11:11:59Z Indexed on 2010/03/30 11:13 UTC
Read the original article Hit count: 555

I have read that to match a word inside of a string using Regular expressions (in .NET), I can use the word boundary specifier (\b) within the regex. However, none of these calls result in any matches

Regex.Match("INSERT INTO TEST(Col1,Col2) VALUES(@p1,@p2)", "\b@p1\b");

Regex.Match("INSERT INTO TEST(Col1,Col2) VALUES(@p1,@p2)", "\bINSERT\b");

Is there anything I am doing wrong ?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#