PHPでテキストをフィルタリングしています。次のようなパターンを探します。
Mary [qtip:had|past tense of have] little lamb.
ツールチップ「haveの過去形」からアンカーテキスト「had」を抽出します]
処理の一部は正規表現を使用することです/\[qtip:([^\|\\]]+)\|?([^\\]]*)?\]/
これはうまくいっています
機能を拡張しようとしています。
Mary [qtip:had|past [otherFunction:tense|verb form signalling time] of have] little lamb.
私の素朴なパターンは、"had"
&"past [otherFunction:tense|verb form indicating time"
[]
埋め込まれたペアをスキップするパターンが必要です。これらは、アンカーまたはツール ヒントでは許可されていません。