Need a regex to match everything that does not contain a '?'

I want a regex with this rule: everything what not contains ?

I tried this but doesn't works:

^(?!\?)$

Answers


To match any string that does not have a ? in it you can use:

^[^?]*$

see it

You can also use a negative lookahead as:

^(?!.*\?).*$

See it


Need Your Help

Failures caused by logrotate on Apache 2 with passphrase protected SSL key

ssl crash apache2 logrotate passphrase

I have an Apache 2 installation on Debian with mod_ssl installed. The server private key is protected by a passphase that needs to be entered on start-up. The error and access logs are subject to

How to reload Iframe content at a time interval so that it does not flicker

c# javascript asp.net iframe flicker

I have kept Iframe inside update panel but then also it flickers every time it reload. I think I can use javascript to load my content of Iframe in order to make it flicker free.Is this way correct...

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.