To match 'b{0,1}rea{0,1}d' : Match : Regular Expressions JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Regular Expressions » Match »

 

To match 'b{0,1}rea{0,1}d'

















<html>
<SCRIPT LANGUAGE='JavaScript'>
<!--
var sToMatch = "bread, bed bead sead sea";
var reBreadReadOrRed = /b{0,1}rea{0,1}d/;
alert(reBreadReadOrRed.test(sToMatch))

    //-->
</SCRIPT>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Regular Expressions
» Match