andrisp Posted August 18, 2005 Report Share Posted August 18, 2005 kaa viss efektiivaak ir wrapot tekstu ? wordwrap nav iisti tas ko gribeetos, mosh ir kaada fja, kas ieliek atstarpi, ja vaards stringaa paarsniedz noteiktu garumu, piemeeram 20 simbolus. Link to comment Share on other sites More sharing options...
v3rb0 Posted August 18, 2005 Report Share Posted August 18, 2005 (edited) preg_replace('/\w{20}/','${0} ','looooooooooooooooooooooooooooooooooooooooooooook at meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!'); upd: ja gribi dikti smalki, tad skaties vai vajag peedeejo atstarpi novakt nost vai nee. Edited August 18, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
andrisp Posted August 18, 2005 Author Report Share Posted August 18, 2005 preg_replace('/\w{20}/','${0} ','looooooooooooooooooooooooooooooooooooooooooooook at meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!'); upd: ja gribi dikti smalki, tad skaties vai vajag peedeejo atstarpi novakt nost vai nee. 21177[/snapback] kaapeec tas ltrim ? Link to comment Share on other sites More sharing options...
v3rb0 Posted August 18, 2005 Report Share Posted August 18, 2005 nav vairs ltrim! Link to comment Share on other sites More sharing options...
andrisp Posted August 18, 2005 Author Report Share Posted August 18, 2005 jaa, es pamaniiju.. kad postoju jautaajumu, tu tiko biji apdeitojis. vari pastaastiit ko noziime {} ? Link to comment Share on other sites More sharing options...
v3rb0 Posted August 18, 2005 Report Share Posted August 18, 2005 (edited) \w{20} nozime 20 burti ${0} nozimee pirmaa sakritiba ar regularo izteiksi (sak skaitit no nulles) Edited August 18, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
andrisp Posted August 18, 2005 Author Report Share Posted August 18, 2005 hmm.. straadaa itkaa.. bet shaadu stringu nedala asdsadjkasdākjdaskljdsalkdjāsdkjskdjskjdāsjdsjdksjdkāskjdksdjā jo tur ir ā,ko vinjs neuzskata par \w kaa regexaa var apziimeet jebkuru simbolu iznjemot whitespace ? Link to comment Share on other sites More sharing options...
bubu Posted August 18, 2005 Report Share Posted August 18, 2005 kaa regexaa var apziimeet jebkuru simbolu iznjemot whitespace ?Šādi jautājumi tev jāuzdot manuālim!\S Link to comment Share on other sites More sharing options...
Recommended Posts