November 2017
Beginner to intermediate
204 pages
5h 23m
English
Regular expressions depend on the use of certain special characters in order to express patterns. Due to this, the following characters should not be used directly unless they are used for their intended purpose:
. ^ $ * + ? {} () [] | \
If you do need to use any of the previously mentioned characters in a pattern string to search for that character, you can write the character preceded by a backslash \ character. This is called escaping characters. Here's an example:
pattern string = "c\*b"## matches "c*b"
If you need to search for the backslash character itself, you use two backslash characters, as follows:
pattern string = "c\\b"## matches "c\b"
Read now
Unlock full access