var ipRE = new RegExp( ^d+.d+.d+.d$ );
i, – “ignore case” – the case (uppercase/lowercase) of all letters within the string will be ignored during testing.
g, – “global search” – the search is carried out across the entire string, regardless of whether a match has already been found.
m, – “multiline search” – the regular expression will match over multiple lines.
^ - This symbol matches the beginning of the string.
d - This meta-character matches a single digit (i.e., 0 to 9).
+ - This symbol says to repeat the preceding pattern or symbol 1 or more times (i.e., 1 or more digits).
.- This sequence is needed to match a period. Since a period hasspecial meaning in a RegExp, we have to precede it with the backslashto indicate that we don't want the special meaning, we really want tomatch a period.
$ - This symbol matches the end of the string.