Skip to content

Instantly share code, notes, and snippets.

@booyaa
Last active November 14, 2017 12:59
Show Gist options
  • Save booyaa/3f396be5b7959289fd65d2090de8b880 to your computer and use it in GitHub Desktop.
Save booyaa/3f396be5b7959289fd65d2090de8b880 to your computer and use it in GitHub Desktop.

maybe turn into a blog post one day

fixed width string to list

briefly appeared on SO before being killed by mods (OP never made an effort to show their progress)

open in repl.it

# source: 00000550000066000007700000880000099
# want: 00000550000066000007700000880000099

import re

print([m.group(0) for m in re.finditer(r"(0{5}\d{2})", "00000550000066000007700000880000099")])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment