Reg ex - find a string without certain characters

Using regex, how do I search for a string that does not include cetrain characters?

If I'm searching through directory in textmate for the string 'flash/' I'd like to exclude the result 'flash/navigation'

Is that possible?

Answers


Use negative look ahead:

/flash\/(?!navigation)/

Need Your Help

Lock-free Reference Counting

c# .net concurrency locking reference-counting

I'm working on a system that requires extensive C API interop. Part of the interop requires initialization and shutdown of the system in question before and after any operations. Failure to do ei...

Export array of objects into Excel using Javascript

javascript arrays excel

I'm writing a client side method, that creates an array of objects.I open an existing excel to write the values from the array. I get the values using getProperty and store in a variable.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.