Bug? Matcher.Find is reset once first examined. - RandomCoder    Jun 11, 2016 had found and I ended up breaking my code. With a little fault finding I worked out that the m.find... As String, blnCaseSensitive As Boolean, intExtractGroup As Int) As String
Dim m As Matcher
If... B4A Code Snippet [B4X] Extract the first letter of a first and last name - TILogistic    May 16, 2024   (9 reactions) = "(\w+).*\W+(\w+)$" Dim Matcher As Matcher = Regex.Matcher(Pattern, Text) Result.Initialize If Matcher.Find Then For i = 1 To Matcher.GroupCount Result.Append(Matcher.Group(i).SubString2(0,1)) Next End If Result.ToString.ToUpperCase End Sub... B4A Example [B4X] Simple function to highlight searchword in texts in CSBuilder Format - fredo    Dec 28, 2024   (10 reactions) HighlightCsTextWithRegex(OriginalText As String, searchWord As String) As CSBuilder Dim escapedSearchWord As String = RegexEscapeSpecialChars(searchWord) Dim pattern As String = "(?i)" & escapedSearchWord ' (?i) case-insensitive! Dim matcher As Matcher = Regex.Matcher(pattern....Find Dim startIndex As Int = matcher.GetStart(0) Dim endIndex As Int = matcher...This simple function highlights all occurrences of a search term in a given text and returns... B4A Code Snippet [B4X] Occurrences - LucaMs    Apr 24, 2023   (12 reactions) , CaseSensitive As Boolean) As Int Dim MatcherX As Matcher Dim Counter As Int If CaseSensitive Then MatcherX = Regex.Matcher(Pattern, Text) Else MatcherX = Regex.Matcher2(Pattern, Regex.CASE_INSENSITIVE, Text) End If Counter = 0 Do While MatcherX.Find... Dim Matcher1 As Matcher = Regex.Matcher("\d+", Text) Do While Matcher1.Find lstResult.Add(Matcher1.Match) Loop Return lstResult End Sub Note: I know very little about... Spanish [B4J] [Solucionado] Prevenir introduccion del caracter "espacio" mediante la combinacion de "Alt + 255" - TILogistic (first post)    Jun 9, 2025   (1 reaction) B4X: Ejemplo busqueda. Dim Text As String = $"HolaÿMundo Texto sin el carácter especial. Aquí hay un Alt+255: ÿ"$ Dim Pattern As String = "\xFF" Dim Matcher As Matcher = Regex.Matcher(Pattern, Text) Do While Matcher.Find Log(Matcher.Match) Loop 164658 usar Regex.Replace 'reemplazar Regex.IsMatch 'verificar si existe ... B4A Question Regex help - drgottjr (first post)    Sep 13, 2024   (1 reaction) .Matcher($"<A HREF="(.+?)">"$, s)
If matcher.Find Then... As Matcher = Regex.Matcher($"(<A HREF=".+?">)"$, s2)
If matcher.Find Then... B4A Code Snippet [B4X] Extract the structure of a URL - TILogistic    Apr 4, 2024   (11 reactions) (+):\/\/(+)(?::(\d+))?(\/*)?(?:\?(*))?(?:#(.*))?"$ 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.Put("port", Matcher.Group(3)) Result.Put("path", Matcher.Group(4)) Result.Put... B4A Tutorial [B4X] Regular expressions (RegEx) tutorial - Erel    Mar 24, 2014   (10 reactions)   tags: Tools ("\w+@\w+\.\w+", data) Do While matcher1.Find = True Log(matcher1.Match) Loop This code...) If matcher1.Find = True Then Dim days, months As Int months = matcher1.Group(1... with regular expressions you can find many good tutorials online. I recommend you to start....Split("+", data) Find matches in string Here we have a long string and we want to find all.... As an example we will find and print email addresses in text: Dim data As String data... B4A Code Snippet [B4X] CSBuilder marking based on regex pattern - Erel    Oct 6, 2024   (20 reactions)   tags: CSS, CSBuilder CSBuilder is supported by B4A and B4J. There are some differences in the supported properties. A more powerful cross platform alternative: BCTextEngine / BBCodeView - Text engine + BBCode parser + Rich Text View This sub searches for matches and uses CSBuilder to mark the matches. 157518... Dim lastMatchEnd As Int = 0 Dim m As Matcher = Regex.Matcher(Pattern, Input) Do While m.Find Dim currentStart As Int = m.GetStart(GroupNumber) cs.Append(Input.SubString2... B4A Example Simple function to convert Markdown Text to CSBuilder Format - fredo    Jul 24, 2024   (9 reactions) " & italicPattern & "|" & urlPattern
Dim matcher As Matcher = Regex.Matcher(combinedPattern, markdown)
Dim lastEnd As Int = 0
Do While matcher.Find
cs.Append(markdown.SubString2(lastEnd, matcher.GetStart(0)))
If matcher.Group(1) <> Null Then
cs.Typeface(Typeface.DEFAULT_BOLD).Append(matcher.Group(1)).PopAll
Else If... Page: 1   2   3   4   5   6   7   |