| |
|
|
Richi | Hi, i want a Text with @MemPos multiple search. only with the Positionierung, the second request seem I a fallacy to have ? CompileMarkSeparationDeclare Dateigröße%,Put$,Daten#
Put$ = "C:\Geladene-Seite.txt"
lesen:
Dateigröße% = @FileSize(Put$)
Print "Dateigröße% = ";Dateigröße%;" Bytes"
Dim Daten#,Dateigröße%+100
ReadText Daten#,Put$
'---------------------test-------------------------
declare pos1%,pos2%,start%,anzahl%,pos3%,pos4%
start% = 0
pos1% = @MemPos(Daten#,start%,"<")' Suche von von Position 0
pos2% = @MemPos(Daten#,start%,">")' Suche von von Position 0
anzahl% = pos2% - pos1%' Berechne die Zeichen zwischen den Fundstellen
print "von:";pos1%;" bis ";pos2%;" Zeichen gefunden: "; @Char$(Daten#,pos1%, anzahl%+1)' Ausgabe der gefundenen Zeichen OK
start% = pos2%+1' Zeiger an die letzten Fund-Position +1
print "start%=";start%
' ------------------------- AB HIER ???
pos3% = @MemPos(Daten#,start%,"<")' ERWARTE SUCHE VON POSITION 9 = start% ???????????????
pos4% = @MemPos(Daten#,start%,">")' ERWARTE SUCHE VON POSITION 9 = start% ???????????????
anzahl% = pos4% - pos3%' Berechne die Zeichen zwischen den Fundstellen
print "von:";pos3%;" bis ";pos4%;" Zeichen gefunden: "; @Char$(Daten#,pos3%, anzahl%+1)' Ausgabe der gefundenen Zeichen / Erwartet wäre:'<befehl1>' ???
Print "Waitkey"
waitkey
Dispose Daten#
end
my loaded-Page.txt: CompileMarkSeparation spending: Image in the attachment or see under
i'd expect the The spending me the following outputs:
<body> <befehl1>
where is my fallacy or unterliege I a bow ??? I bastle there already two days around.
thanks for Help
|
|
|
| |
|
|
|
Jörg Sellmeyer | posx% is Yes no absolute worth, separate MemPos counts ex the new Startposition The Bytes To to next Fundstelle - here means 2.
so functions it: @Char$(data#,start% + pos3%, number%+1) You must means The position/start% always "mitführen". |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/15/13 ▲ |
|
|
|
|
Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/15/13 ▲ |
|
|
|
|
Richi | Hello Jörg,
i want so what How in PHP The String-function strip_tags make, where any HTML command removes go. Since I not any HTML command indicate would like etc would I simply everything between < and > from the Text Remove.
2. now had I probably too things How href left in the Text stand The ought to I naturally To to out search can
I have now My routine so knotted that I not any more durchblicke I catch mean once more tommorrow new on
for ideas and suggestions thanks too for your Help |
|
|
| |
|
|
|
H.Brill | Perhaps help there too The regulären expressions, about so : Match$("<[a-zA-Z]{1,?}>", String$(area#, 0))
had to time try. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 11/15/13 ▲ |
|
|
|
|
Jörg Sellmeyer | Richi (15.11.13)
i want so what How in PHP The String-function strip_tags make, where any HTML command removes go. Since I not any HTML command indicate would like etc would I simply everything between < and > from the Text Remove.
really could you then with my method everything in a list write. The can you then work out and your Text (i'd everything in a Stringvariable reading) courage Translate$() Edit.
Richi (15.11.13)
2. now had I probably too things How href left in the Text stand The ought to I naturally To to out search can
I kenn me there not so from - stand href-left too in pointed clinging (<href> </href>)? depending on, whether You The pertinent left keep want, can you then before whom code on The same point on href and /href parsen and the left by SubStr$() in a list reading.
Richi (15.11.13)
I have now My routine so knotted that I not any more durchblicke I catch mean once more tommorrow new on
the kenn I
Richi (15.11.13)
for ideas and suggestions thanks too for your Help
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/15/13 ▲ |
|
|
|
|
Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/16/13 ▲ |
|
|
|
|
H.Brill | Hello Jörg, very the meant I. RegExp would I vorziehen, because one there already The System-Variables $Match, &MatchPo, %MatchLen always to hand has. is too a swell thing in link with @Translate$() and Instr(). If one then yet on Rolands verlinkte Page (Help) goes, becomes it yet interessanter.
PS: having too time to some Monaten something like for Tags used : CompileMarkSeparation |
|
|
|