RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
^((Bob)|(John)|(Mary)).*$(?<!White)
Description
&quot;Starts with but does not end with.&quot; I needed a pattern to require certain first (and optional middle) names, but to fail for certain last names. So if Bob, John, and Mary are acceptable first names but the White's are always rejected then...
Matches
Bob Jones | John Smith | Mary Jane Smith
Non-Matches
Bob White | Mary Doe White | Gina Smith
Author Rating: Not yet rated. Eli Robillard
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials