Regex example

by borayeris

HTML

<div id="write3"></div>

JavaScript

$(function(){
     str = "For more information, see Chapter 3.4.5.1";
     re = /(chapter \d+(\.\d)*)/i;
     found = str.match(re);
    $('#write3').html(found.toSource());
 });