Skip to main content

16 docs tagged with "regular expressions"

View All Tags

Alternation (OR) |

Alternation is the term in regular expression that is a simple “OR”. In a regular expression an “OR” is denoted with a vertical line character. Questions

Backreference Pattern

A backreference in a regular expression identifies a previously matched group and looks for the same text again. Regular Expressions Interview Questions

Capturing Groups

A capturing group is a pattern enclosed in parentheses. It two affects consisting of getting part of match as a separate or isolated item in an array of items.

Catastrophic Backtracking

Catastrophic backtracking is a condition that can occur if you are checking a (usually long) string against a complex regular expression.

Character Classes

Character Classes are used to match text against regular expressions. A character class is a special notation that matches any symbol from a set. Questions

Escaping Characters

To match a character having special meaning in regex, you need to use a escape sequence prefix with a backslash (\). Regular Expressions Interview Questions

Greedy / Lazy Quantifiers

By default, quantifiers are Greedy. Greedy quantifiers try to match the longest text that matches given pattern. Regular Expressions Interview Questions

Lookahead / Lookbehind

The lookahead approach involves in catching a match based on a proceeding character or digit.

Multiline Mode

The m flag is used to specify that a multiline input string should be treated as multiple lines. Regular Expressions Interview Questions

Patterns and Flags

Patterns and Flags are used to match text against regular expressions. They are used to match text against regular expressions. Interview Questions

Quantifiers

A quantifier is used to find the exact count in a sequence of digits. JavasScript Interview Questions and Answers

Regex / String Methods

Regex / String Methods - The following are the methods available in the regular expression and string objects. Regular Expressions Interview Questions

Regex Sets / Ranges

In simple terms, a range in a regular is denoted or expression inside of square brackets. For instance, [a-z] denotes a range of lowercase letters.

Regex Sticky Flag

Regex Sticky Flag - The flag y allows us to perform the search at the given position in the source string. There is a performance gain when using flag y.

Unicode Regex

Unicode Regex is used to match text against regular expressions. It is used to match text against regular expressions. Regular Expressions Interview Questions

Word Boundary

A word boundary \b is a test, just like ^ and $. When the regexp engine comes across \b, it checks that the position in the string is a word boundary.