1. Michael2150

    Android Question Get a input hint generated for a certain regex

    Hi this isn't an important question more just out of interest, but I was wondering if there is some sort of algorithm that could generate an input hint for something like an edittext. This hint should be derived from a regex. For example the regex input being "^(?=.*[1-9].*)[0-9]{3}$" and the...
  2. Alexander Stolte

    Android Code Snippet [B4X] Check Valid E-Mail Format

    Private Sub EmailAddressCheck(email As String) As Boolean Return Regex.IsMatch("^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$",email) End Sub If EmailAddressCheck("") = True Then Log("E-Mail is valid") Else...
  3. Alexander Stolte

    Android Code Snippet [B4X] Count Regex Matches

    Sub CountMatches(text As String,pattern As String) As Int Dim tmp_count As Int = 0 Dim Matcher1 As Matcher Matcher1 = Regex.Matcher(pattern, text) Do While Matcher1.Find tmp_count = tmp_count +1 Loop Return tmp_count End Sub
  4. W

    Android Question Regex string contains some letter

    I need a regex expression to detect if a string contains some letters. The string can contain everything but I need to know if there are some alphabetic characters in.
  5. R

    Android Question Suggestion to add to popup help

    Wasted some time to debug an algorithm as I wasn't aware that the pipe character (|) in Regex is a special character and needs to be escaped. Took some time to pinpoint the problem and made the mistake to not search the forum and coded a split function: Sub Split(strSplitter As String...
  6. peacemaker

    Android Question Regex in B4A 9.30

    HI, All Before update to B4A 9.30 this sub worked OK: Sub IfFormattedQR (text As String) As Boolean Dim res As Boolean = Regex.IsMatch("\d{4,}", text) Return res End Sub Strings like "TEST0000", "TEST9999"... were matched OK, as on After update to B4A v.9.30 ...
  7. walterf25

    Android Question Regular Expression

    Hello All, i need some help figuring out how to write a regular expression to parse a very specific group of data from a large file, I have tried several patterns that I have found online but non of them return the results I'm trying to achieve. I have tried the following: But again it doesn't...
  8. Flavio SOuza

    Android Question [Solved] How to pick up HTML content with B4A

    Hi, I'm new to B4A, I was programming in PHP about 5 years ago. I'm venturing and enjoying the B4A. My question is, I have an HTML and I need to get the contents of these HTML. Follow the HTML link and print from the part I need to capture. I thank you for your attention. URL -> html...
  9. Maodge

    Android Question [solved]regex question

    hi, i test my regex on web (javascript) realize a function ,get all strings between "{" and "}" from a file. it works OK, and matched all. see attached pic but when i use it inB4A, it does not work. s1 = File.ReadString(File.DirAssets,"songgrouplist.txt")...
  10. MarkusR

    Android Question [solved] Regex i need "name1.name2" into "Name1 Name2"

    hello, is there a way to replace the first char of a word into uppercase? i have "name1.name2" i need "Name1 Name2" User = User.Replace( "."," ") User = Regex.Replace( "\b[a-z]",User, "$0") ???
  11. R

    B4J Tutorial [SQLite] Make Custom Functions and Regex

    SQLite3 has the REGEXP keyword. That means we can do SQLite queries like SELECT * FROM table1 WHERE col1 REGEXP '\d+[a-z]+\d*'; . Unfortunately, the REGEXP keyword references an SQLite user defined function that is not defined by default. That means if we want to use REGEXP in our SQLite...