Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

Regex to find out length

$
0
0
Lets say I want to "encrypt" the ID number 123456789 - add '*' to all the digits up to the last four - *****6789.
A starting point is to replace .*(....) with *$1. But it would produce *6789, which is too short.
How can I know how many chars the first .* matched?

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>