Topic: About using match()
<html>
<head>
<title>JavaScript String match() Method</title>
</head>
<body>
<script type="text/javascript">
var str = "For more information, see Chapter 3.4.5.1";
var re = /(chapter \d+(\.\d)*)/i; <-----------------
var found = str.match( re );
document.write(found );
</script>
</body>
</html>
This returns the value Chapter 3.4.5.1,Chapter 3.4.5.1,.1
Just came across this code while studying the match() function..I was wondering whats the meaning of that code that I colored RED...
Last edited by jtified (2009-08-26 00:50:35)
