Projects > Regular Expression
May 31, 2021 | Learning JS
Regular Expression, a.k.a regex, is used to help programmers to find, match, search, replace the text. So what I learn so far?
let sentence = "ImBeginnerJS"; let searchText = /JS/; // What you want to find searchText.test(sentence); // Return T or F
searchText = /JS|gin|Im/; // | means or searchText.test(sentence);