mirror of
https://github.com/ziishaned/learn-regex.git
synced 2025-12-09 19:13:55 -05:00
Add regex flags
This commit is contained in:
parent
84c270e189
commit
a2944dc149
16
README.md
16
README.md
@ -266,4 +266,18 @@ regular expressions The shorthand character sets are as follows:
|
|||||||
|\D|Matches non-digit: `[^\d]`|
|
|\D|Matches non-digit: `[^\d]`|
|
||||||
|\s|Matches whitespace character: `[\t\n\f\r\p{Z}]`|
|
|\s|Matches whitespace character: `[\t\n\f\r\p{Z}]`|
|
||||||
|\S|Matches non-whitespace character: `[^\s]`|
|
|\S|Matches non-whitespace character: `[^\s]`|
|
||||||
|\c|Matches non-whitespace character: `[^\s]`|
|
|\c|Matches non-whitespace character: `[^\s]`|
|
||||||
|
|
||||||
|
## 4. Lookaheads
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 5. Flags
|
||||||
|
|
||||||
|
These flags can be used in any order or combination, and are an integral part of the RegExp.
|
||||||
|
|
||||||
|
|Flag|Description|
|
||||||
|
|:----:|----|
|
||||||
|
|i|Case insensitive: Sets matching to be case-insensitive.|
|
||||||
|
|g|Global Search: Search for a pattern throughout the input string.|
|
||||||
|
|m|Multiline: Anchor meta character works on each line.|
|
||||||
Loading…
x
Reference in New Issue
Block a user