capsx Posted December 6, 2004 Report Posted December 6, 2004 preg_replace("/\ (.*)\[\/QUOTE\]/",'<blockquote>\\1</blockquote>',$text); kaa jamo piespiest lai repleiso tekstu kuram pa vidu ir newlines ?
bubu Posted December 6, 2004 Report Posted December 6, 2004 preg_replace("/\ (.*)\[\/QUOTE\]/n",'<blockquote>\\1</blockquote>',$text);
capsx Posted December 6, 2004 Author Report Posted December 6, 2004 preg_replace("/\(.*)\[\/QUOTE\]/n",'<blockquote>\\1</blockquote>',$text); ko tu ar to biji domajis ??
bubu Posted December 6, 2004 Report Posted December 6, 2004 To ko tu arī biji prasījis. /n modifiers to arī nodrošina, meklēšanu ignorējot newlainus.
capsx Posted December 6, 2004 Author Report Posted December 6, 2004 (edited) nez, es nevaru taadu atrast, un tas repleiss ar vairs uzreiz nestraadaa... Unknown modifier 'n' Edited December 6, 2004 by capsx
Kaklz Posted December 6, 2004 Report Posted December 6, 2004 multiline pattern modifikators ir m, nevis n ;) :P
capsx Posted December 6, 2004 Author Report Posted December 6, 2004 multiline pattern modifikators ir m, nevis n ;) :P Kaklz es to jau meginaju, tapat nesanaak...
Kaklz Posted December 6, 2004 Report Posted December 6, 2004 (edited) nevaig gadījumā arī case-insensitive match? tb pielikt klāt arī i modifikatoru? p.s. vispār jau ātrāk tas viss varētu notikt, ja tu iedotu konkrētu teksta gabalu, kuru tev neņem pretī. Edited December 6, 2004 by Kaklz
capsx Posted December 6, 2004 Author Report Posted December 6, 2004 (edited) <? $text='hdfkasdg [ASD]skh ash f [/ASD] gshfdg hfdg hdfg hsfdg hdfgh dsfgh sdjfg jhdfg sjhdgfh sd'; $text.=' [ASD]skh ash f gshfdg hfdg hdfg hsfdg hdfgh dsfgh sdjfg jhdfg sjhdgfh sd [/ASD]'; $text=preg_replace('/\[ASD\](.*)\[\/ASD\]/im','<blockquote>\\1</blockquote>',$text); echo $text; ?> rezultaatc ir: hdfkasdg skh ash f gshfdg hfdg hdfg hsfdg hdfgh dsfgh sdjfg jhdfg sjhdgfh sd [ASD]skh ash f gshfdg hfdg hdfg hsfdg hdfgh dsfgh sdjfg jhdfg sjhdgfh sd [/ASD] Edited December 6, 2004 by capsx
bubu Posted December 7, 2004 Report Posted December 7, 2004 Pareiz, es to s arī biju domājis, tikai aizmirsis kā sauc. Slinkums bija manuāli vērt vaļā un lasīties (bet tev pašam gan to vajadzēja pirmām-kārtām izdarīt). Eh, kā nekā - pirmdienas grūtas dienas ;)
capsx Posted December 8, 2004 Author Report Posted December 8, 2004 nu neizlasiju es riktigi par to /s :)
Recommended Posts