I need a regex that will only find matches where the entire string matches my query.
For instance if I do a search for movies with the name \"Red October\" I only wa
I know that this may be a little late to answer this, but maybe it will come handy for someone else.
Simplest way:
var someString = "..."; var someRegex = "..."; var match = Regex.Match(someString , someRegex ); if(match.Success && match.Value.Length == someString.Length){ //pass } else { //fail }