Link to home
Start Free TrialLog in
Avatar of Richard Lloyd
Richard Lloyd

asked on

REGEX with 2 formats

Hi I have a regex which works fine on

ABCDE123456X  - /LYBLA[0-9]{6}X/i (Fixed ABCDE, followed by 6 digits, and a fixed X.

I need to change this to be able to use a 7th digit instead of the final fixed X as well as the original format, for example

ABCDE1234567 and ABCDE987654X

Please advise
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard Lloyd
Richard Lloyd

ASKER

Thank you
Solution according to author's comment