Created
September 18, 2014 21:31
-
-
Save neumino/e04494837b430c7a565c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Suppose that there are 10 digits somewhere in the string | |
// Extract the 10 digits, and concatenate them | |
r.add(r.args( | |
r.expr('(123) 456-7890').match('^[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*([\\d]{1})[^\\d]*$')("groups")("str") | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment