Salgar
21.06.2004, 21:45
Servus Leute,
ich habe in meiner variable sowas:
<table><tr><td>
<table><tr><td>
Ganz toller Text
</td></tr></table>
</td></tr></table>
Und ich will das hinterher das hier rauskommt:
<table><tr><td>
Ganz toller Text
</td></tr></table>
Natürlich soll er bei folgendem Text nix machen:
<table><tr><td>
<table><tr><td>
Ganz toller Text
</td></tr></table>
</td></tr>
<tr><td>
lala
</td></tr></table>
Bin langsam am verzweifeln, vielleicht ists aber einfach nur zu spät :)
TIA
Pascal
EDIT:
Die Zeilenumbrüche und Leerzeichen braucht ihr nicht beachten die hab ich nur zur lesbarkeit reingetan. In meiner Variable stehen die nicht (mehr) drin.
EDIT 2:
Habs jetzt raus:
s/<table><tr><td>(<table><tr><td>.*?<\/td><\/tr><\/table>)<\/td><\/tr><\/table>/$1/gi
ich habe in meiner variable sowas:
<table><tr><td>
<table><tr><td>
Ganz toller Text
</td></tr></table>
</td></tr></table>
Und ich will das hinterher das hier rauskommt:
<table><tr><td>
Ganz toller Text
</td></tr></table>
Natürlich soll er bei folgendem Text nix machen:
<table><tr><td>
<table><tr><td>
Ganz toller Text
</td></tr></table>
</td></tr>
<tr><td>
lala
</td></tr></table>
Bin langsam am verzweifeln, vielleicht ists aber einfach nur zu spät :)
TIA
Pascal
EDIT:
Die Zeilenumbrüche und Leerzeichen braucht ihr nicht beachten die hab ich nur zur lesbarkeit reingetan. In meiner Variable stehen die nicht (mehr) drin.
EDIT 2:
Habs jetzt raus:
s/<table><tr><td>(<table><tr><td>.*?<\/td><\/tr><\/table>)<\/td><\/tr><\/table>/$1/gi