May I know what ?= means in a regular expression? For example, what is its significance in this expression:
?=
(?=.*\\d).
If you want to mask a credit card number (execpt) the last 4 digits/characters, you could use ?= in your regex.
cc = "1234-5678" cc.replace(/.(?=....)/g, '#');
cc = #####5678
#####5678