Autor Beitrag
Ebil
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Do 12.06.08 22:58 
Ich will einen text nach jedem tab trennen (es ist ein kopierter text der so eingefügt wird),
leider ist es nicht immer nur ein wort sondern manchmal auch kleine wortgruppen (bla blaaa blaaa) und wenn ich den delimiter char(9) angeb(tab), trennt delphi trozdem alles.

slist.Delimiter := Char(9);

Danach ist auch dort, wo nur normale leerzeichen waren alles getrennt :/
Wie kann man das problem lösen?

Gruß
Ebil
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 13.06.08 00:14 
Moin und :welcome: im Forum!

user profile iconEbil hat folgendes geschrieben:
Danach ist auch dort, wo nur normale leerzeichen waren alles getrennt :/
Wie kann man das problem lösen?
Die Datenfelder mit dem Quoting-Zeichen einschließen oder Suche in: Delphi-Forum, Delphi-Library EXPLODE nehmen. :idea:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
wazup
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 101

Windows XP
Delphi 2009
BeitragVerfasst: Fr 13.06.08 09:34 
Das selbe habe ich mit Regulären Ausdrücken gelöst, funktioniert wunderbar...
RegExpr: Syntax

cu, wazup
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.06.08 09:45 
Ab D7 besitzt die Stringliste die Eigenschaft .StrictDelimiter, mit der man festlegen kann, ob Leerzeichen als zusätzlicher Trenner wirken soll

_________________
Markus Kinzler.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 13.06.08 09:48 
Moin!

user profile iconmkinzler hat folgendes geschrieben:
Ab D7 besitzt die Stringliste die Eigenschaft .StrictDelimiter
Definitiv nicht (jedenfalls bis incl. D7), hab gerade nachgesehen. :nixweiss:

@user profile iconwazup: Für sowas "einfaches" ist ein RegEx-Matcher aber wohl etwas übertrieben, da das ganze nicht gerade performat ist... :?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.06.08 09:50 
Ok dann ab D10. Dachte aber das diese Eigenschaft schon ab D7 vorhanden gewesen wäre :gruebel:

_________________
Markus Kinzler.
Ebil Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131



BeitragVerfasst: Fr 13.06.08 15:43 
Das es eine so einfache lösung wie strictdelimiter gibt hätte ich nicht gedacht! Danke.

Gruß
Ebil