The CreatorCon Call for Content is officially open! Get started here.

Regex issue

tsoct
Tera Guru

I need the input to begin with 'IT' followed by 25 characters.

When I tested IT60X0542811101000000123456 for regex ^IT\[0-9A-Z]{25}$, no matches were detected.

What might be the reason?

 

1 ACCEPTED SOLUTION

Amit Verma
Kilo Patron
Kilo Patron

Hi @tsoct 

 

Can you please try with the below regex :

^IT[A-Z0-9]{25}$

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

10 REPLIES 10

Sujatha V M
Kilo Patron
Kilo Patron

@tsoct  Could you please try it as /^IT+.*/g 

 

Is this your expectation?

 

SujathaVM_0-1715270951723.png

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Yes, however the character following IT must be 25 characters in total.

@tsoct  /^IT+.{0,25}$/g

 

SujathaVM_0-1715271404445.png

 

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

The 25 characters should include only uppercase or digits