N
N
ninja op op2020-05-22 12:39:43
Regular Expressions
ninja op op, 2020-05-22 12:39:43

Search REGEX case insensitive?

How to make word search using regular expressions case insensitive. I know there is such a game as /i
, but if you do it, then it searches for words throughout the text.
For example:
I am writing: vapovapolaylvoaryvloalSlovOyvoayvayvldaoyldvaodl - it finds.
And I need: WORD - it finds, but so that there are no such cases as above

I don’t know how to implement it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-05-22
@dimonchik2013

learn about greed
and about normal regexps
you wrote the answer to the question yourself, this is /i in puff

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question