1234
123456
ADSL
16000
2464
VDSL
51392
10048
89752921
ADSL SA 16000
89742312
VDSL SA 50 Mbit/s
89753005
ADSL_shared 16000
89742472
ADSL SA 2000 RAM
89760773
ADSL SA 16000 J
89742311
VDSL SA 25 Mbit/s
89742473
ADSL SA 6000 RAM
89739864
ADSL shared 2000 RAM
89739865
ADSL shared 6000 RAM
89743558
VDSL SA 16 Mbit/s
10201
DSL sofort verfuegbar, es konnten nicht alle moeglichen Produkte recherchiert werden
[/code]
For this is use the RexEx Code:
[code]dim rx as new RegEx
rx.SearchPattern = “(?i-Ums)(.+)”
dim match as RegExMatch = rx.Search( sourceText )
[/code]
The XML String Encoding is UTF8.
RegExRX correctly finds 10 times the Groups between the Tags, but in Xojo, only the first one is found (SubexpressionCount = 2).
I already tried to work with ReplaceLineEndings and RexEx Greedy Mode, but nothing works as expected.
Your Code and the fact that a simple rx.Search without a TargetString seems to just continue the last Search, fixed the issue. Now it’s working as expected.
BTW: This is just a Quick&Dirty solution while i have to build my XMLParser Classes for the Service.
I asked Kem to add this snippet to the “copy Xojo native code” menu from RegexRx
because you should always use it like this or you get only the first match.
but so far, no update
[quote=409083:@Jean-Yves Pochez]I asked Kem to add this snippet to the “copy Xojo native code” menu from RegexRx
because you should always use it like this or you get only the first match.
but so far, no update ;)[/quote]
I am sure @Kem Tekinay will include this in his 64bit Update.
Good advice, because, like most programmers, I write the best code when sleep-deprived. So good, in fact, I later don’t understand why I did it, what I was thinking, or why it doesn’t work.
I don’t like the native xml classes because the error detection is not bulletproof.
often, you get an error for a missing caracter.
with regex, you have a better control of the sourcetext.
although I confirm that with an xml text you should use xml classes over regex.
[quote=409096:@Kem Tekinay]Good advice, because, like most programmers, I write the best code when sleep-deprived. So good, in fact, I later don’t understand why I did it, what I was thinking, or why it doesn’t work.