I am creating dashboard with backend python script which displays data extracted from an email account. Currently, the backend script that parses the various emails operates off of regex matching for certain email addresses and phrases. The client would like to have the ability to add additional regex parameters in the future, but is not familiar with creating regex.

Could anyone offer some suggestions as to how I could create this component to allow for the dynamic addition of phrases in the future. It's almost like the script would need to compile regex on the fly based on any additional phrases that the user adds.

For instance, they may want to scan the email for an example phrase like:

ABC shopping list order: [a-z]+

the regex being any combination of letters after the colon.

  • re.compile – JimmyJames Jan 22 at 22:46
  • Your question sounds extremely trivial, can you elaborate it ? What did you try, are there any specific constraints that you have ? What is wrong with saving regex expressions, read and execute them accordingly ? – nadir Jan 23 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.