Priyanshu Dangi
Priyanshu Dangi

Reputation: 1

a regular expression not able to understand

/[a-z\s]+[A-Za-z][A-Za-z0-9]*\,?[\sA-Za-z,]+;/

int A;

(int space A) is passing in the online regex101.com but i am not getting how it get passed as [a-z\s]+ this will process upto "int " and will move to next on A now A; is left A will pass the [A-Za-z] now ; left but [\sA-Za-z,]+ is still there and + means 1 or more so it should not pass.

Can someone explain where i am going wrong?

Upvotes: 0

Views: 17

Answers (0)

Related Questions