I’m creating a program that will electronically conjugate verbs in Spanish from their infinitive forms. For those of you who aren’t super familiar with Spanish, a Spanish infinitive is the unconjugated form of a verb. Here are a few examples of Spanish infinitives:
Hablar,
Comer,
Escribir,
Acostarse,
Comprometerse,
Vestirse
All infinitives in Spanish either end with “ar,” “er,” “ir,” “arse,” “erse,” or “irse.” Each of these endings require an entirely different set of conjugations, thus I need to separate each one and handle them differently.
I want to know what regular expressions can do the following:
Find infinitive forms ending with “ar.”
Find infinitive forms ending with “er.”
Find infinitive forms ending with “ir.”
Find infinitive forms ending with “arse.”
Find infinitive forms ending with “erse.”
Find infinitive forms ending with “irse.”
This has been done before.
Except that for real work, you might want to do the forms with non-reflexive attached pronouns too, like decírmelo.