... and the quotemeta operator can also help when interpolating variables that may contain special characters into regular expressions. | [reply] [d/l] |
| [reply] |
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
| [reply] [d/l] [select] |