in reply to Re: Looking for a cleaner regex
in thread Looking for a cleaner regex

It's not just a list of words. It's a generalized regex to recognize standard verb forms in Spanish. That it's embedded in a shell script doesn't negate the fact that it's perl. It is a one liner. You got that much!

Replies are listed 'Best First'.
Re^3: Looking for a cleaner regex (trie)
by LanX (Saint) on Dec 08, 2017 at 13:18 UTC
Re^3: Looking for a cleaner regex
by Anonymous Monk on Dec 08, 2017 at 14:04 UTC
    Are you asking for help with shell or regex? Are you honestly editing this regex as presented in a shell script? You know how you got newlines and indenting in your shell script? Your regex is easily 10 times more complex than hilite_tail. You might need it in one line for your shell(doubtfull) but its silly for human to write code/regex without whitespace. Accoreing to your code Spanish verb endings is a static list of 20ish words -- if you think that requires optimization you havent timed it. To speedup what you have Replace guts of hilite_tail with single call to perl that does it.