What I understood from your question is that you want 'n' to match with both 'n' and 'ñ' when doing a word search. If that is the case, you can simply define an equivalence table and construct a pattern from it:
import re
multi_match = {
'n': r'[nñ]',
'e': r'[eé]',
# and more
}
def word_search(text:str, word: str):
pattern = ''
for c in word:
pattern += multi_match[c] if c in multi_match else c
return re.findall(pattern, text)
text = 'épée epee piñata pinata'
print(word_search(text, 'epee'))
print(word_search(text, 'épée'))
print(word_search(text, 'pinata'))
print(word_search(text, 'piñata'))
Output:
['épée', 'epee']
['épée']
['piñata', 'pinata']
['piñata']
Of course you could also define equivalences so that 'ñ' matches with both 'n' and 'ñ', if that is something that you want.