#python3 regex gotcha: not every digit ("\d") looks like digits you know
>>> import re
>>> re.match(r'\d+', '٢٣٤٥٦٧٨٩')
<re.Match object; span=(0, 8), match='٢٣٤٥٦٧٨٩'>
Explanation and solution:
>>> import re
>>> re.match(r'\d+', '٢٣٤٥٦٧٨٩')
<re.Match object; span=(0, 8), match='٢٣٤٥٦٧٨٩'>
Explanation and solution:
🐍Python Tip: To convert your strings to be URL friendly. For example, when constructing an API request/query strings, you can use urllib's quote method like so 👆🏻
#networkautomation #python #python3
#networkautomation #python #python3