D
D
Dubrovin2021-08-08 20:10:36
Regular Expressions
Dubrovin, 2021-08-08 20:10:36

How to exclude a string from a regular expression search?

There are, for example, the following lines:
1) word-any-text-here-without-word
2) word-any-text-but-is-word-unique-any-text
3) word-other-any-text
4 ) word-one-another-any-text-but-with-the-word-unique-and-further-any-

text .e rows 1 and 3) should be selected?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-08-08
@dodo512

^word(?!.*unique).*
https://regex101.com/r/ECqpSD/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question