Skip to main content

I’m making a zap where users will send a message in Discord including a time. The zap is meant to find that time and create a calendar event based on it. The only issue is that it’s hard to get people to use the exact correct time format to match the pattern I put in with Python Regex. This is what I currently have to match this format (00:00PM): \d\d:\d\d\w\w
 

I’d like to have this search for multiple patterns: \d\d:\d\d\w\w OR \d:\d\d\w\w OR \d\d:\d\d\s\w\w OR \d\d:\d\d\s\w\w but it doesn’t seem the OR command is working. I would like to know if this is possible and if not, is there a workaround?

 

Thanks!

Thank you so much this was exactly what I needed.


Hi @innate!

I’m by no means a regex expert, but some Googling suggest that the OR command should be a pipe character (as opposed to the word ‘or’) is that what you’ve been using? I apologise if you have and you were just translating for folks!