Skip to content

Commit d3716c1

Browse files
Create README.md
1 parent 7d2015b commit d3716c1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# regex-engine
2+
## Introduction
3+
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.
38+
39+
## Usage
40+
```
41+
$ make
42+
$ ./output
43+
```

0 commit comments

Comments
 (0)