0 votes

I have to find a large numbers of files, containing Danish social security numbers
the syntax of Danish social security numbers is xxxxxx-xxxx and it is only numbers in all 10 characters

by (20 points)

1 Answer

+1 vote

Switch the search to Regular Expression (if using Agent Ransack it's in the Options tab) and then try this Containing Text expression:

[0-9]{6}-[0-9]{4}

But, a brief look on the Internet for Danish social security regex will show more specific regular expressions, such as:

[0-9]{2}[0-1][0-9][0-9]{2}-[0-9]{4}
by (30.1k points)
...