Pattern Matching


Match method

sOriginalText.match(/dog/) 


IndexOf method

sOriginalText.indexof("dog") 



Regular Expression Literals

let regexStr = /dog/ 


Regular Expression Constructor

let regexStr = new RegExp("dog"); 


search, replace, extract




© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext