Reputation: 20100
I would like my File Search to find occurrences of insert name
, regardless of interceding characters or new lines. I would like to find both:
insert into name
insert into
name
insert.*name
- works for the first occurrence but not the second
(?s)insert.*name
- fails to find either line
insert((.|\n)*)name
- gives an error
Upvotes: 1
Views: 33
Reputation: 34255
Use [\s\S]
instead of .
:
insert[\s\S]*name
or not greedy (if in insert name - insert name
there should be two matches instead of one match of the whole sentence):
insert[\s\S]*?name
Upvotes: 1