B4A Question Regex htpp:// ... - JohnC (first post)    Nov 13, 2023   (1 reaction) ChatGPT answered:
Dim m As Matcher = Regex.Matcher(pat, str)
If m.Find() Then
Log("URL is valid")
Else
Log("URL is not valid")
End If B4A Code Snippet [B4X] Extract the structure of a URL - TILogistic    Apr 05, 2024   (11 reactions) :#(.*))?"$ Dim Matcher As Matcher = Regex.Matcher(Pattern, URL) Dim Result As Map : Result.Initialize If Matcher.Find Then Result.Put("url", Matcher.Group(0)) Result.Put("scheme", Matcher.Group(1)) Result.Put("domain", Matcher.Group(2)) Result Italian Doppie Virgolette - LucaMs (first post)    Mar 06, 2024   (1 reaction) Private Sub SplitAsList(Text As String) As List
Dim lstResult As List
lstResult.Initialize
Dim Matcher1 As Matcher
Dim Pattern As String
Pattern = $"\"(*?)\"|(+)"$
Matcher1 = Regex.Matcher(Pattern, Text)
Dim Block As String
Do While Matcher1.Find
Block = B4A Code Snippet [B4X] Extract the first letter of a first and last name - TILogistic    May 16, 2024   (9 reactions) Extracts the first letter of a first name and last name. If you wish, you can extract the first letter of the first name and the full last name. Log(GetNameLetter("ti-logistic")) Log(GetNameLetter("Aeric Poon")) Log(GetNameLetter("McFarland, Dave")) Log(GetNameLetter("A & W")) L B4A Code Snippet [B4X] Validate and verify CIF, NIF, DNI and Others - TILogistic    Nov 29, 2021   (9 reactions) CIF.ToUpperCase) Matcher1.Find Dim Checksum = 0, Pos = 0 As Int For Each Val As Int In Regex.Split("", Matcher1.Group(2)) Dim Sum As Int For Each Num As Int In Regex.Split("", (Val*(2-(Pos Mod 2))).As(String)) Su B4A Question Page parse - Erel (first post)    Jan 17, 2023   (3 reactions) MiniHtmlParser will not help here as you actually need to find the json string and then parse it. The problem here is that the json string is broken. So you end with: Dim m As Matcher = Regex.Matcher($"\"price\": \"(\d+)\""$, s) If m.Find Then Log(m.Group(1)) End If B4A Code Snippet [B4X] Occurrences - LucaMs    Apr 24, 2023   (11 reactions) Sub OccurrIndexes(SubString As String, Text As String, CaseSensitive As Boolean) As List Dim lstResult As List : lstResult.Initialize If CaseSensitive = False Then SubString = SubString.ToLowerCase Text = Text.ToLowerCase End If Dim StartIndex As Int = Text. Bug? Matcher.Find is reset once first examined. - RandomCoder    Jun 11, 2016 Public Sub Extract( strPattern As String, strText As String, blnCaseSensitive As Boolean, intExtractGroup As Int) As String
Dim m As Matcher
If blnCaseSensitive Then
m = Regex.Matcher(strPattern, strText)
Else
m = Regex.Matcher2(strPattern, Regex.CASE_INSENSITIVE, B4A Question [SOLVED] Full name field Validation - TILogistic (first post)    Dec 05, 2021 other:
Private Sub
Log("*** Free format of names and surnames ***")
Dim Matcher1 As Matcher = Regex.Matcher("(+)", B4XFloatTextField1.Text)
Do While Matcher1.Find
Log("Found: " & Matcher1.Match)
Loop
Log("*** Fixed format First Middle Last ***")
I B4A Question Counting specific characters in autocompleEditText - Erel (first post)    Dec 03, 2020   (1 reaction) Sub CountOccurrences (text As String, match As String) As Int
Dim count As Int
Dim m As Matcher = Regex.Matcher($"\Q${match}\E"$, text)
Do While m.Find
count = count + 1
Loop
Return count
End Sub Page: 1   2   3   4   5   6   7   Powered by ColBERT |