I want a regular expression that will ignore the sentence containing the character "XYZ". I use this, but it does not work.
<td>(.+[^XYZ])</td>
To match a string that does not contain the string "XYZ", you can use a negative scan :
^(?:(?!XYZ).)*$
If you just want to verify that the string does not contain any of these characters at any position, use the negative character class:
^[^XYZ]*$
"(. + [^ XYZ])" means "at least one character followed by neither X, Y, Z.
Comparing everything that does not contain X, Y, Z, works with "([^ XYZ] *)" or "([^ XYZ] +)" if you want to get empty matches.
Source: https://habr.com/ru/post/1308636/More articles:Is it possible to recompile sql parameters using cfquery result? - coldfusionJava newbie problem: private access package - javaSeparating queries in code between multiple servers - performanceDraw a column graph with no space between columns - graphJQuery dialog to open another page - jqueryHow should I handle URL routing in my application? - javaSort list in OCaml - ocamlHow can I clone "hg" from another machine? - mercurialJava - threading issue - javaWhat does this MySQL statement do? - mysqlAll Articles