.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: 263
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