0

What im trying to achive is that select first character but only if its a-z or A-Z.

I found this: ^[a-zA-Z][a-zA-Z0-9.,$;]+$ but problem is that if i have a544334 it select all string, and i want to select only first character.

Something like this ^G so if i have G454 it will select only G.

Any suggestion?

None
  • 8,817
  • 26
  • 96
  • 171

1 Answers1

0

^[a-zA-Z] is enough actually.

As suggested in comments, you can use a lookahead, but what would you do that if you don't care about the next chars ?

David Amar
  • 247
  • 1
  • 5