Android Question [RESOLVED] RegexBuilder Match

MarcoRome

Expert
Licensed User
Longtime User
Hi i have this code:

B4X:
Dim rx9 As RegexBuilder
                rx9.Initialize.AppendEscaped($"pflist-reviewstars"$).Append(rx9.CharAny).AppendAtLeastOne.AppendEscaped($"<li class="pflist-address"$)
                Dim mat9 As Matcher = Regex.Matcher(rx9.Pattern, res)
                Dim i As Int = 0
                Do While mat9.Find
                    Log(mat9.Match)
                    i = i + 1
                    Log("i: " & i )
                Loop

if i found in res the string "pflist-reviewstars" i found this 53 time, same thing if i found for "<li class="pflist-address" i found 53 time.

But if i read with code i found only 5 time that is this first format:


Another 48 next i have this code in res that also if start with "pflist-reviewstars" and in end is "<li class="pflist-address" ISNT intercept.


The only different is in that have space ? or return ?
But in code i have ...Append(rx9.CharAny):

B4X:
 rx9.Initialize.AppendEscaped($"pflist-reviewstars"$).Append(rx9.CharAny).AppendAtLeastOne.AppendEscaped($"<li class="pflist-address"$)

Any suggestion ?
Thank you
Marco
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…