Skip to content

Commit

Permalink
New regex.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Oct 3, 2023
1 parent 51593ab commit f53bd07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev/community_scripts/cleanup_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@


def strip_number_from_string(input_string):
match = re.search(r'(\D+)(\d+)$', input_string)
#match = re.search(r'(\D+)(\d+)$', input_string)
#match = re.search(r'([\w\d_]*)(\d+)$', input_string)
match = re.search(r'([\w_]*[A-Za-z_])(\d+)$', input_string)
if match:
prefix = match.group(1)
number = match.group(2)
Expand Down

0 comments on commit f53bd07

Please sign in to comment.