.NET Entire line match.

Posted by user93422 on Stack Overflow See other posts from Stack Overflow or by user93422
Published on 2010-05-11T15:37:58Z Indexed on 2010/05/11 15:44 UTC
Read the original article Hit count: 248

Filed under:
|

I need to check if entire given input matches given pattern.
But wrapping a pattern in ^/$ feels like a hack.
Is there a shortcut for:

var match = Regex.Match(myInput, "^" + myPattern + "$");

?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about regex