Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 225 Bytes

20221216144546.md

File metadata and controls

12 lines (9 loc) · 225 Bytes

find digits in string

A quick way to get the change stats from this commit message line:

>>> s = "2 files changed, 31 insertions(+), 3 deletions(-)"
>>> import re
>>> re.findall("\d+", s)
['2', '31', '3']

#regex