Expand description
A handful of universal regular expressions.
This is a collection of the most used regular expressions to reduce making rudimentary mistakes and make the code even more readable. Except English, there are patterns for five other languages as Persian, French, German, Arabic and Chinese.
Structs§
Constants§
- ALPHA_
NUMERIC - Should be used inside the list method for its full capability.
- ANY
- BACKSPACE
- CHINESE_
ALPHABET - Should be used inside the list method for its full capability.
- DATE
- Captures day, month and year in all valid formats.
- DIGITS
- Should be used inside the list method for its full capability.
- Retrieves two capturing groups, one for username, the other for mail server and its domain.
- FORM_
FEED - FRENCH_
ALPHABET - Should be used inside the list method for its full capability.
- GERMAN_
ALPHABET - Should be used inside the list method for its full capability.
- IPV4
- LOWER_
CASE - Should be used inside the list method for its full capability.
- MONTH_
NAMES - Complete and abbreviated forms of Gregorian months (case sensitive).
- NEW_
LINE - NULL_
CHAR - PERSIAN_
ALPHABET - Should be used inside the list method for its full capability.
- PERSIAN_
ALPHA_ NUMERIC - Should be used inside the list method for its full capability.
- PERSIAN_
ARABIC_ NUM - Should be used inside the list method for its full capability.
- PERSIAN_
PUNCTUATION - PERSIAN_
SPACES - Should be used inside the list method for its full capability.
- TAB
- TIME_
HH_ MM_ 24 - Captures hour and minute in 24-hour clock.
- TIME_
HH_ MM_ 12_ AMPM - Captures hour, minute and optional case-insensitive am/pm in 12-hour clock.
- TIME_
HH_ MM_ SS_ 24 - Same as
TIME_HH_MM_24
captures hour, minute as well as seconds. - TIME_
HH_ MM_ SS_ 12_ AMPM - Same as
TIME_HH_MM_12_AMPM
capturing hour, minute, seconds and optional case-insensitive am/pm. - UPPER_
CASE - Should be used inside the list method for its full capability.
- UPPER_
LOWER_ CASE - Should be used inside the list method for its full capability.
- VERTICAL_
TAB - WEBSITE_
URL - Retrieves protocol, subdomain, domain name, top level name, directory and query params of a URL on multiple lines.