Regex for entity extraction in a translation chatbot

Hello!

I’m trying to build a RASA NLU model for intent and entity extraction for a translation system. This system is capable of translate words and expressions (multiple words) from a spanish to english and provide definitions of words (which are my only intents: translation and definition. The entities would

I’ve provided a lot of examples in my nlu.md file and intents recognition is working fine, but I’m struggling with entity extraction.

For this reason, I’ve developed 2 big regex expressions capable of extracting the word or expression asked in a question (in spanish), but I don’t know how or where to implement them, since I don’t think RASA regex feature is designed for this kind of regex expression.

I’ll write here an example of this regex (translation one):

trad[ú|u]([a-zA-Záéíóú]*) (de )?(la palabra )?(.*)(( en| al) ingl[é|e]s)|trad[ú|u]([a-zA-Záéíóú]*) (de )?(la palabra )?(.*)|es (.*)(( en| al) ingl[é|e]s)|(decir|digo|dice|dir[i|í]as?|di) (.*)(( en| al) ingl[é|e]s)|(decir|digo|dice|dir[i|í]as?|di) (.*)

Is it possible to implement it with RASA? Maybe in a custom response or something? Is there any other easier method to obtain my entities with more or less high accuracy?

Thank you in advance!