Tuesday 16 May 2017

How to replace a string in regular expresstion [duplicate]

This question already has an answer here:

I have a regular expression like this :

/^(?=.*\d)(?=.*[a-zA-Z])[0-9a-zA-Z]{[[LENGTH_VALIDATION]],}$/

and i want to replace [[LENGTH_VALIDATION]] with a integer value like 5 or 6 using javascript.

How can i do that ? I tried with str.replace() but its giving error;



via Maverick

No comments:

Post a Comment