in reply to Re: What does it mean Nested quantifiers in regex
in thread What does it mean Nested quantifiers in regex

So if i changed the (m/^de.e++ ) plus sign to \+\+ it can work is it?

  • Comment on Re^2: What does it mean Nested quantifiers in regex

Replies are listed 'Best First'.
Re^3: What does it mean Nested quantifiers in regex
by jethro (Monsignor) on Aug 24, 2010 at 10:02 UTC
    Yes, but it depends on what you want to parse with that regex. If you want to parse exactly the string "de.c++issues", then you need the regex de\.c\+\+issues. Note that I also escaped the '.' as that is a special char in regexes as well. (Escaping is the method of removing the specialness of special characters by putting a '\' in front of them)

    Or as salva propossed, you could write \Qde.c++issues\E, that would automatically escape all special characters between \Q and \E. This is probably the better way as you don't seem to know much abouts regexes and there are a lot more special characters