Flutter / Dart - Parsing a Textfield controller text for multiple matches of a RegExps and calling a function each time it matches

I have a textfield controller which matches a RegExp whenever the user type it in. For example the typed in string may be <code>"@jack and @jill went up the hill"</cod...

RegExp how to extract amount from a String

I have a string <pre><code>String str = Rs.50000.00 paid thru A/C XX3380 on 28-6-22 16:21:15 to ---, UPI Ref ----. If not done, SMS BLOCKUPI to ----.-Canara...

Allow some characters in flutter field input Regex

I want to make my form field input to pass through a validator to allow only alphabets number and three symbols - ' / to pass. <pre><code>r'^[A-Za-z0-9\s-/]+$'; </...

Flutter / Dart Regex - Highlight Words matching search query

I currently have built a search bar with a table that lists out data. I am trying to match each word or letter in the search query and highlight the words accordingly....

How to get value of R, G, and B from RGB string in dart?

I've tried the following code in dart, but unable to get solution. <pre class="lang-dart prettyprint-override"><code>RegExp rgb = RegExp(r^rgb\(([0-9]+),\s*(...

Flutter TextField inputFormatters not wokring with my custom regex

I want to allow this kind of input to my text field: <pre><code>123 *123# *123*4# </code></pre> so I created and tested <code>RegExr</code> website this regex:<...

How to do a camel case to sentence case in dart

Something is wrong with my attempt: <pre><code>String camelToSentence(String text) { var result = text.replaceAll(RegExp(r'/([A-Z])/g'), r $1); var...

Flutter regular expressions

Im struggling with regular expressions. Here I have an example ! <pre><code> RegExp timeExp = RegExp(r^[0-9]{1,2}?:[0-9]{0,2}); String time1 = &qu...

How to get string in a Text using regex in Flutter

I am trying to get <code>/data/user/0/com.example.notes/app_flutter/image_picker8474259280565710843.jpg</code> this in dart (Flutter). I have tried the below co...

Flutter TextFormField FilteringTextInputFormatter remove leading zero

I'm trying to implement an inputfield of number with 3 rules: <ol> <li>Number can range from -3000 ~ 3000, including zero</li> <li>Can't have/replace leading zeros...

Dart RegExp word boundary equivalent

I try to match words and sentences that include exactly word "world" in my flutter application. I think that the best way to do this it to use word boundaries. My rege...

Dart http requests to manipulate a website with expression language

Well i'm a student , and i'm still learning the dart language and the flutter framework, I was trying to make an application that makes you able to login into a site w...

extract email address from String using regex

I want to extract email address from the Html String. First I extract the text from html string then pass the returning string into regular expression to search for em...

How to add a variable in the regex flutter

I don't found how to add variable in a regex for example I have a String who is an output of list MyString =list:[2020-09-05 12:23, 2020-09-04 12:2...

Automatic clear of Text Form Field

I have text form field to check full name of user , I want it to accept only Arabic letters, English letters and space this code work fine <pre><code> `Fil...