I have to write a regex where it will mask all the digit in a string.
Eg:
Input: 1234567890 expiry date is 1211
Output: ********* expiry date is ****
or
Input: 1211 and number is 1234567890</p>
Output: **** and number is *********
I am using:
var myregexp = /^(?:\D*\d){3,30}\D*$/g;<br/><br/>
whole string is getting masked using the above regex.