Make sure to be in global mode (g flag), case insensitive and to have the dot all option on.
This regular expression will match all HTML tags and their attributes.
This free regular expression tester lets you test your regular expressions against any entry of your choice and clearly highlights all matches.
Note that there's just no way to check if the last portion of a path is a file or a directory just by the name alone.
Regular expressions define text patterns to find inside a string.
They use a special syntax to define what text in the string being searched will match.
Consult this page for more details on this problem. For the actual date validity, you should rely on another language.
The following expressions will validate the number of days in a month but will NOT handle leap year validation; hence february can have 29 days every year, but not more. A SIN should also be validated by computing the checksum digit.This is by no means comprehensive but is intended as a short overview of regular expressions.