Io usoespressioni regolari lookbehind problema
(?<!value=\")##(.*)##
per abbinare stringa come ## MyString ## che non è in forma di:
<input type="text" value="##MyString##">
Questo funziona per il modulo di cui sopra, ma non per questo: (Corrisponde ancora, non deve corrispondere)
<input type="text" value="Here is my ##MyString## coming..">
Ho provato:
(?<!value=\").*##(.*)##
senza fortuna. Qualsiasi suggerimento sarà profondamente apprezzato.
Edit: Sto usando PHP funzione
Non utilizzare regex per analizzare HTML: utilizzare un parser HTML. http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 –
Che lingua stai usando? –
Sto usando PHP. –