Hi all, can anyone please give me a regular expression or similar to grab the first character of a string please?
I.e. (Like VB's Left function) returning "A" from the string "Alex" ?
Thanks All !
Printable View
Hi all, can anyone please give me a regular expression or similar to grab the first character of a string please?
I.e. (Like VB's Left function) returning "A" from the string "Alex" ?
Thanks All !
the substr function
Try this.
If that doesn't work, then find a book. :)Code:myFirstChar = myString.match(/^./);
Thanks - big shout out to both of yous guys ! :D