Javascript regex to python

I have found Javascript code that I need to rewrite in Python. It is something similar to regex

var unique = '2021/05/03 20:36:36'
unique: unique ? unique.replace(/[^0-9]/g, '') : null,

result of unique is 05032021233636

can someone help me with writing this expression in Python



Read more here: https://stackoverflow.com/questions/67375597/javascript-regex-to-python

Content Attribution

This content was originally published by Chaban33 at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: