Regular Expressions

Note: If you find any issues in the post, do let me know in the comments section. Regular Expressions It is not a Programming language Everything is a character Character classes dot class . matches every character except line breaks. match Any [\s\S] matches every character including line breaks. word \w matches low ascii characters - alphanumeric and underscore equivalent to [a-zA-Z0-9_] not word \W matches anything other than a word equivalent to [^a-zA-Z0-9_] digit \d matches any digit from 0 to 9 equivalent to [0-9] not digit \D matches any character other than digit equivalent to [^0-9] space \s matches spaces, tabs, line breaks not space \S matches any other than space, tabs, line breaks character set [] matches any character in the set example expression: [aeiou]...

August 21, 2017 ยท Vedhavyas Singareddi