Best answer

Can you use AND/OR with 'Extract Pattern'?

  • 23 August 2022
  • 2 replies

  • Anonymous
  • 0 replies

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?




Best answer by Danvers 23 August 2022, 12:18

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

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!

Thank you so much this was exactly what I needed.