Notepad ++ and regex
I am doing some tests with Find in Notepad ++ using regex. Here is my problem that I cannot figure out why:
My text:
abc/xyz/p234/s-sdf
The following regex matches well:
[a-z]+/[a-z]+(/p[0-9]+)/s-[a-z]+
But why does the following regex (with "?" Appended) no longer match:
[a-z]+/[a-z]+(/p[0-9]+)?/s-[a-z]+
Am I correct that in the last regex '?' means that (/ p [0-9] +) can be displayed zero or one time?
+3
source to share
No one has answered this question yet
Check out similar questions: