Im trying to do a regular expression to get something like this:
The string can be
/dira/dirb/dirc/dirn?e=0?e=0?e=3?e=0?e
or
/dira/dirb/dirc/dire/dirw/dirw/diw?e=?e=?e=3?e=?e
(The number of subdirs is variable)
I need to capture /dira/dirb/dirc/dirn?e=0 if the first e have value or /dira/dirb/dirc/dirn?e= if the first e dont have value:
I have this:
(.+)(\?e=\d?)
Im try with http://gskinner.com/RegExr/ but i dont find nothing.
Use this regex:
(/dir?.)+(\?e=\d*)+\?eOr, if the
diwat the end of the second example isn’t just a mistake in your post, then your regex should be(/dir.)+(\?e=\d*)+\?e.