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?

2
  • 1
    ^[a-zA-Z](?=[a-zA-Z0-9.,$;]+$) Commented Feb 28, 2020 at 12:20
  • that is it .. tnx :) Commented Feb 28, 2020 at 12:21

1 Answer 1

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 ?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.