Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex boolean not

Tags:

.net

regex

How do I write a .net regex which will match a string that does NOT start with "Seat"

like image 789
Bender Avatar asked Jan 08 '09 16:01

Bender


1 Answers

What you're looking for is:

^(?!Seat).+

This article has more information about look aheads.

like image 79
Soviut Avatar answered Oct 13 '22 00:10

Soviut