Can someone provide me with a regex that finds this line: <% but excludes this line: <% @ Thanks.
If you are using .NET, the regular expression you are looking for is:
<%([email protected])
It will also work in non-.NET applications, but some regex implementations do not support (?!)
The exact correct answer depends on different regex syntaxes, but something like this should work:
<%[^@]
or perhaps this if your regex syntax allows you to:
<%([^@]|$)
<% ( ), , , .
, , , " " (, Perl #):
How about this
It matches the end of a line or [^ @], which is a character class containing all characters except @
Depending on your updated request, any of them will work:
<%([email protected]|-) <%(?![@-])
Source: https://habr.com/ru/post/1710142/More articles:C # Begin minimization / hiding process on Pocket PC Windows CE - c #How to check asp.net server management - asp.netPub / Sub Architecture - multithreadingHow does Microsoft MEF compare to Eclipse? - eclipseWhat is the best way to convert HTML to Excel? - javascriptDictionary Size - memory-managementКак узнать размер сессии ASP.NET, когда в нем есть несериализуемые объекты? - asp.netHow to check my anti-spam code against bots? - securityChange AppSettings in App.Config of another Exe - c #Saving JSON to a database and loading using jQuery - jsonAll Articles