Skip to main content

I am trying to extract the first letter from a string.

For example: If the String is "Customer"

                      I want the first letter 'C' as the result

Can any one advise on this please?

You can use ^.

This is a good site (RegExr: Learn, Build, & Test RegEx ) to practice regEx and figure out solutions. 


where exactly do you need that?

I do not want to say it's not possible with regex, but wouldn't it be much easier with simple substring() function?


Reply