Regex search for a list of Contact IDs
It's true - looking at the code, I can see that Search Builder expects an integer if you're searching on an integer field.  An exception is made for using the IN operator, in which case it validates each value separately.

Trying to validate a regex to ensure it's non-malicious is a very difficult task, and I think the appropriate answer is to remove the regex function from the Search Builder on integers.  Work is being done on Civi 5.2 to remove operators from Search Builder that aren't appropriate.

However, to solve YOUR problem, you should use IN, separating your values by commas like so: 64,5917,5725,5892,5852,5818,5893,5850