TroisVerites Posted July 11, 2012 Share Posted July 11, 2012 Hi All, I want to split a string containning multilines. I have tryed some code but no success. sa := ExplodeEx('#13#10',s,0); or sa := ExplodeEx('#13#10',s) If someone can help me. I know i can use regular expression but I don t know how to use them. Thanks Quote Link to comment Share on other sites More sharing options...
sjesper Posted July 11, 2012 Share Posted July 11, 2012 When you make a #13/#10 shouldn't you make the ''#13#10' but only #13#10. Here is an example of how to do your example: [sCAR] var s: String; TSA: TStringArray; I: Integer; begin s := 'Hello' + #13#10 + 'Im awe' + #13#10 + 'some'; TSA := Explode(#13#10,s); for i := 0 to high(tsa) do writeln('TSA[' + IntToStr(i) + ']: ' + TSA); end.[/sCAR] Just ask if you have more questions :-) Quote Link to comment Share on other sites More sharing options...
TroisVerites Posted July 11, 2012 Author Share Posted July 11, 2012 Thanks . Quote Link to comment Share on other sites More sharing options...