Regular expression | Description | Text | Output |
\d | Matches one digit | Hi, my roll number is 53. | 5, 3 |
\D | Matches one non-digit | 15 cars | c, a, r and s |
\w | Matches one word (except spaces) | 15 cars | 1, 5, c, a, r, s |
\W | Matches one non word | 15 cars | Contains one space |
. | Matches one single character except line breaks | 15 cars | 1, 5, , c, a, r, s |
\n | Matches a new line | This is line 1 This is line 2 |
Contains a new line character |
Quantifiers | Meaning |
+ | One or more occurrences |
* | Zero or more occurrences |
? | Zero or one occurrence |
{n} | Exactly n number of occurrences |
{n,m} | n to m number of occurrences |
{,n} | Zero to n number of occurrences |
{n,} | n to more number of occurrences |
\b | Matches either beginning/ending of a word |
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.