Autor Beitrag
seddto
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 56



BeitragVerfasst: Sa 20.03.04 16:32 
Ich habe folgendes Problem. Ich möchte eine String-Variable nach einem Wort durchsuchen- Das gleiche Wort kommt in der Variable an zwei verschiedenen Stellen vor. Ich möchte die Position des zweiten Wortes haben. Wenn ich nun mit dem Befehl POS suche bekomme ich natürlich immer nur die Position des 1. Wortes. Weiss jemand wie ich die Position des zweiten Wortes ermitteln kann?

Danke & LG Seddto

Moderiert von user profile iconDeCodeGuru: Topic verschoben
catweasel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 487
Erhaltene Danke: 1

Win 7 64bit
Delphi 7 Second Sedition V7.2
BeitragVerfasst: Sa 20.03.04 16:53 
Spontan würde ich sagen :

Nach dem ersten finden den reststring erneut durchsuchen und die neu gefundene Position zu Position 1 addieren ...

Catweasel

_________________
Pommes werden schneller fertig wenn man sie vor dem Frittieren einige Minuten in siedendes Fett legt.
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: Sa 20.03.04 16:54 
Hallo.


Nimm eine while-schleife und posEx.

_________________
mfg.
mâximôv
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Sa 20.03.04 21:53 
Nur mal ne Frage am Rande: Ist PosEx nicht erst seit Delphi 7 dabei? :?

_________________
Viele Grüße
Jakob
maximus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 896

Win XP, Suse 8.1
Delphi 4/7/8 alles prof
BeitragVerfasst: So 21.03.04 03:00 
Ich glaub du hast recht. Das problem hatten wir schonmal -> www.delphi-forum.de/...&highlight=posex

Da steht auch die posEx procedure!

_________________
mfg.
mâximôv