
Document.getElementById('build'); Techs: HTML, CSS , JavaScript, and MySQL
Joined February 2023
- Tweets461
- Following55
- Followers30
- Likes1.9K
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
[3-3] This makes '\S' useful for matching any part of a string that contains visible content rather than spaces, tabs or newlines.
35
Regex 18/33
'\s' is a special sequence that matches any whitespace character. Whitespace characters include spaces, tabs, and newline characters.
36
Regex 16/33
In JS, '\d' is a shorthand character class that matches any digit character and it's equivalent to the character set '[0-9]'.
@CodeSnapDev
















