You are not logged in.
#1 2014-05-16 05:15:54
How to find first alphabetical letter in a string using JavaScript.
Find First Alphabetical Letter In a String Using JavaScript:
Maybe one of the shortest solutions:
'45 Church St'.match(/[a-zA-Z]/).pop();
Since match will return null if there are no alphanumerical characters in a string, you may transform it to the following fool proof solution:
('45 Church St'.match(/[a-zA-Z]/) || []).pop();
Online Web Tutorials And Interview Questions With Answers Forum:
https://globalguideline.com/forum/
Offline
2014-05-16 05:15:54
- Advertisement
- Ads By Google
Re: How to find first alphabetical letter in a string using JavaScript.
\n
The following user say "Thank You" for this post:Guest