How do I do an "OR" for my python regex? -


re.compile("abc") 

i "abc" or "xyz".

use |:

re.compile("abc|xyz") 

it's worth perusing regular-expression.info detailed information regular expression howto , re — regular expression operations python documentation.


Comments

Popular posts from this blog

php - How to build a web site which gives a sub-domain dynamically to every registered user? -

Delphi Wmi Query on a Remote Machine -