
Document.getElementById('build'); Techs: HTML, CSS , JavaScript, and MySQL
Joined February 2023
- Tweets461
- Following55
- Followers30
- Likes1.9K
Regex 27/33
1) .matchAll()
- The .matchAll() method in #javascript is used to find all matches of a regex in a given string. It returns an iterator of all matches, which includes matched text and any capturing groups.
1
42
4) This method is especially helpful when you need to find multiple occurrences of a pattern in a string.
1
30
Regex 26/33
Capture groups allow you to capture parts of a pattern match and can be used to find repeated substrings in the regular expression. To repeat a match with capture groups, use backreference and quantifier to match the same pattern multiple times.
#javascript #coding
31
Regex 25/33
Searching patterns with regex is useful, but it's better when it can replace text too. To search and replace text in a string, use .replace(). The code below shows a quick example to illustrate its functionality.
#javascript
34
Regex 24/33
In #javascript, regular expressions are used to match patterns in strings. Parentheses "( )" are used in #regex to create groups of characters or subpatterns that can be used for various purposes, such as capturing, repeating or applying a quantifier.
#CodingJourney
38
Regex 23/33
In regular expression, the question mark "?" means the preceding element can appear either zero or one time, indicating that it is optional .
1
42
Regex 22/33
You can specify an exact number of matches. To indicate a specific number of patterns, simply place that number within the curly brackets without placing a comma and a maximum number.
@CodeSnapDev #codinglife
Regex 21/33
To specify a minimum number of patterns with no upper limit, use a comma after the lower number in curly brackets.
let regex = /r{5,}/;
let regex = /Extr{5,}a/;
54
Regex 20/33
You can define the range of patterns using quantity specifiers enclosed in curly brackets '/{ }/'. Simply place two numbers inside the brackets to specify the minimum and maximum number of patterns.
43
Regex 19/33
[1-3] (Uppercase) '\S' in JavaScript matches any character except whitespace characters (e.g. spaces, tabs, newlines ('\n'), carriage returns ('\r'), form feeds ('\f'), vertical tabs ('\v').
1
39
[2-3] It includes visible characters like alphanumeric characters, punctuation marks, symbols, and non-whitespace control characters.
1
40
Regex 18/33
'\s' is a special sequence that matches any whitespace character. Whitespace characters include spaces, tabs, and newline characters.
36
















