📜  就像在 javascript 代码示例中一样

📅  最后修改于: 2022-03-11 15:02:12.490000             🧑  作者: Mango

代码示例1
// 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 */
}