You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A regular expression (shortened as regex or regexp) is a sequence of characters that specifies a search pattern. Regular expressions are extremely useful in
4
+
extracting information from any text by searching for one or more matches of a specific search pattern
5
+
(i.e. a specific sequence of ASCII or unicode characters).Usually such patterns are used by string-searching algorithms for
6
+
"find" or "find and replace" operations on strings, or for input validation.
7
+
8
+
It is a technique developed in theoretical computer science and formal language theory.
9
+
Fields of application range from validation to parsing/replacing strings, passing through translating data to other formats and web scraping.
10
+
11
+
## Operations supported
12
+
* greedy and non-greedy
13
+
* Support the following macros
14
+
*[]
15
+
* a-z
16
+
* A-Z
17
+
* 0-9
18
+
* Individual characters and numbers
19
+
* ^
20
+
* $
21
+
* .
22
+
* ?
23
+
*\+
24
+
*\*
25
+
* \d
26
+
* \w
27
+
* \s
28
+
* escape characters
29
+
30
+
## Function/Interface supported
31
+
match is the only function supported for the client as an interface. all other functions are not available to the client, they are implementation functions
32
+
(internal static functions)
33
+
### match
34
+
```c
35
+
node_t *match(char *pat, char *text);
36
+
```
37
+
it returns starting and ending position of the string if the substring of text matches with the pattern else returns null.
0 commit comments