File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/exercises/regular-expressions Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Regular Expressions
3
+ *
4
+ * Regular expressions (regexes) are a set of characters that define a search pattern.
5
+ *
6
+ * The constructor for the RegExp object takes two parameters:
7
+ * the regular expression and the optional match settings, as shown here:
8
+ *
9
+ * i ==> Perform case-insensitive matching
10
+ * g ==> Perform a global match (find all matches rather than stopping after first match)
11
+ * m ==> Perform multiline matching
12
+ *
13
+ * RegExp has the following two functions:
14
+ * 1. search(): Tests for matches in a string. This returns the index of the match.
15
+ * 2. match(): Tests for matches. This returns all the matches.
16
+ *
17
+ * The JavaScript String object also has the following two regex-related functions that accept the RegExp object as an argument:
18
+ * 1. exec(): Tests for matches in a string. This returns the first match.
19
+ * 2. test(): Tests for matches in a string. This returns true or false.
20
+ */
You can’t perform that action at this time.
0 commit comments