Duration: 20 minutes
Summary: In this video we continue our discussion of regular expressions. We illustrate an example of doing match but for dates in this case. We see the use of \D for non digits, \d for digits. We also see the use of * to match 0 or more characters and the use of + to match 1 or more characters. Once we build that expression, we match against a date in the string. We also looked at examples for matching text at the beginning and end of a string. JavaScript uses ^ to match text at the beginning and $ for matching text at the end of a string. We still use /i to ignore case during search. In another example, we searched a string for a match of space and a + sing (\s\+), but instead of displaying the result, we replaced the match with another string using the replace function.
Methodology of the development of example: Good coding standard and simplified design.
Technology Used: JavaScript – Core language Concepts
Keywords: JavaScript, HTML, function, var, script, document, writeln, Regular Expression, test, exec, replace, match.












See the prices for this post in Mr.Bool Credits System below: