Last active
December 12, 2015 02:48
-
-
Save nassimhaddad/4701563 to your computer and use it in GitHub Desktop.
Tricks with regular expressions
This file contains hidden or 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
# tricks with regular expressions #### | |
# insert character after a given pattern: use \\1 | |
sub("([[:digit:]]{4})", "\\15", "12346789") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment