user2881809
user2881809

Reputation:

Why my regexp not working in notepad++?

lines:

<option value="148">&nbsp; Подарки, сувениры</option>
<option value="96">&nbsp; Товары для дома</option>

I would like find thyes in notepad++ with find with regexp, for this i use regexp:

/<option value=\"\d{1,3}\">/g

enter image description here

But i get 0 matches...

I check regexp on online tester and see that it work: enter image description here

But why my regexp not working in notepad++ ?

Upvotes: 0

Views: 76

Answers (2)

H.Wolper
H.Wolper

Reputation: 709

Just as @Jerry wrote in his comment: /..../g is JavaScript regular expressions notation. I checked in Notepad++ and <option value=\"\d{1,3}\"> works.

Upvotes: 0

sp00m
sp00m

Reputation: 48817

/.../flags is the JavaScript regexp literal notation. The real regexp actually is what's inbetween the two /, i.e. in your case <option value=\"\d{1,3}\">.

Side note: no need to escape the " in this case: <option value="\d{1,3}">.

Upvotes: 1

Related Questions