in reply to What does it mean Nested quantifiers in regex

Another hint: If you don't want to have these '+' as quantifiers and instead want to match plus signs literally, change them to \+\+

Replies are listed 'Best First'.
Re^2: What does it mean Nested quantifiers in regex
by salva (Canon) on Aug 24, 2010 at 06:40 UTC
    ... and the quotemeta operator can also help when interpolating variables that may contain special characters into regular expressions.
Re^2: What does it mean Nested quantifiers in regex
by anakin30 (Acolyte) on Aug 24, 2010 at 07:05 UTC

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

      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