smarty Posted June 13, 2005 Report Share Posted June 13, 2005 Sveiki! Gribeetu atkal sho to noskaidrot par regular expressions. Piemeeram, kaa aizvietot tekstaa komatus ar atstarpeem, ja aiz tiem neseko atstarpe. Respektiivi, teksts "aaaaa,bbbbb, ccccc" top par "aaaaa bbbbb ccccc" Link to comment Share on other sites More sharing options...
v3rb0 Posted June 13, 2005 Report Share Posted June 13, 2005 (edited) ... (kārtības labad, šito manu postu var dzēst nost- aplami atbildēju) Edited June 13, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
Delfins Posted June 13, 2005 Report Share Posted June 13, 2005 (edited) [,\s]+ ==> ' ' (tukšums) aaaaa,bbbbb, ccccc ddddd, , ,, eeee,,fff=>aaaaa bbbbb ccccc ddddd eeee fff Edited June 13, 2005 by Delfins Link to comment Share on other sites More sharing options...
bubu Posted June 13, 2005 Report Share Posted June 13, 2005 (edited) ... Neņemiet vērā, Delfins piemērs ir ok :) Edited June 13, 2005 by bubu Link to comment Share on other sites More sharing options...
Delfins Posted June 13, 2005 Report Share Posted June 13, 2005 ...Neņemiet vērā, Delfins piemērs ir ok :) 18496[/snapback] piedod, vai [] nozīmē obligāti ? turklāt es speciāli iepestoju rezultātu uz visādiem variantiem - ja viņam der, lai lieto... Link to comment Share on other sites More sharing options...
Delfins Posted June 13, 2005 Report Share Posted June 13, 2005 ha ha, nolagoja forums, ielikās nepareizs QUOTE :) Link to comment Share on other sites More sharing options...
bubu Posted June 13, 2005 Report Share Posted June 13, 2005 Man iepriekš sajuka [] ar () Link to comment Share on other sites More sharing options...
smarty Posted June 14, 2005 Author Report Share Posted June 14, 2005 bljaaviens, straadaa nevainojami. es kaut kaadu workaroundu biju izdomaajis, bet shis risinaajums ir vienkaarshi elegants. paldies :) Link to comment Share on other sites More sharing options...
smarty Posted June 14, 2005 Author Report Share Posted June 14, 2005 tad veel pie reizes... ir neliela saape ar linkiem. tos izkasa ar preg_replace_callback("/((http(s?):\/\/)|(www\.))([\:\/#\?=&\+%;\-\w\.\~\^]+)/i", '_url_callback', $body); bet ir viens aakjis, ja teksts ir piemeeram shaads Un tasda www.kaka.lv. Arsdf sdfsdf. tad tiek panjemts arii tas punkts. es atkal praatoju un uztaisiiju workaroundu, kursh tajaa callback funkcijaa nogriezh to punktu, bet gan jau ka var to tajaa pat preg_replace iemaaniit. Bet kaa?? Link to comment Share on other sites More sharing options...
Delfins Posted June 14, 2005 Report Share Posted June 14, 2005 nu ar tiem URLiem ir baigais čakars, jo tagad ar copy/paste var visu ko iepeistot "Es iesaku apmeklēt www.kaka.lv?go=mans.klubs.lv&root=., jo tas irā krūtā" ... vot i meklē te tagad URLa beigas... Link to comment Share on other sites More sharing options...
Kavacky Posted June 14, 2005 Report Share Posted June 14, 2005 Līdz pirmajai atstarpei. Link to comment Share on other sites More sharing options...
smarty Posted June 14, 2005 Author Report Share Posted June 14, 2005 jaaaaaaaa nu tieshaam liidz pirmai atstapei, bet to punktu nevajag!!! Link to comment Share on other sites More sharing options...
Recommended Posts