Learn Java
Tuesday, 18 August 2015
How to find a String that starts/ends with in jQuery
There are several ways to find a String that startswith or endswith the specified value. I have used the regular expression
if (str.match("^Hello")) {
// ...
}
if (str.match("World$")) {
// ...
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment