Answers for "like in javascript"

0

like in javascript

// Match a string that ends with abc, similar to LIKE '%abc'
if (theString.match(/^.*abc$/)) 
{ 
    /*Match found */
}

// Match a string that starts with abc, similar to LIKE 'abc%'
if (theString.match(/^abc.*$/)) 
{ 
    /*Match found */
}
Posted by: Guest on August-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language