I\'m looking for a regular expression to catch all digits in the first 7 characters in a string.
This string has 12 characters:
A12B345CD678
You can also use a simple negative lookbehind:
s <- "A12B345CD678" gsub("(?