に私は、これらの可能な入力正規表現とPython
Defender el anteproyecto;
Defender los anteproyectos;
Defender;
Anteproyectos
を持って、私は私がいない成功を収めてr"(?i)defender (anteproyectos?)?"
を試してみただけで達成される最後の2のみ2最初のではなく、を一致させることができますPythonの正規表現を必要としますPythonのロジックのようなもので:if "xyz" and "uvw" in "abc"
あなたがanteproyecto
(とやs
なし)を作っている(?i)defender (anteproyectos?)?
あなたの正規表現で
*最初の2が、最後の*ではありません。マッチングのルールは何ですか?最初の単語は常に「防御者」、2番目の「エル」または「ロス」であるべきですか? – RomanPerekhrest
試してみてください: '(?i)defender。+?anteproyectos? ' – Toto
@働いたトートタンク! – margobra8