Exclude strings of words using wildcards

Hi community,

I cannot seem to come up with the appropriate wildcard (I suppose it must be [!]) which would exclude from the expression

⟨argument[oales]{1,4}⟩

the following three words

argumentos
argumenta
argumentas

In other words, I would like it to find only the following three words

argumento
argumental
argumentales

so maybe it’s the expression ⟨argument[oales]{1,4}⟩ which is not appropriate to begin with.

Note that I am actually trying to find a ‘pattern expession’ so that I can use it with any other morphological word family; thus, those three words are mere examples.
I would use this pattern in a macro, and possibly in Find and Replace option, to implement replacements in batch.

Hope to hear news soon.
Thank you so much in advance.

Hi

If I understand well you can search for:

\bargumento\b|\bargumental\b|\bargumentales\b

Explanation: \b for Word boundaries

Regards

Bearing in mind that pattern matching, as the term indicates, is best used to find rather than exclude patterns, the following will match only the desired terms:

argument(o[^s]|al(es)?)

Hi @oweng

Nice, but may I suggest: argument(o|al(es)?)\b

(not to select the space after the word, to find the the word at the end of the paragraph, to avoid selecting the word followed by a letter other than s, etc.)

Regards

Thanks pierre-yves. That is a distinct improvement for the reason you indicate. I am still thinking of strings rather than words :slight_smile: