Numerical Methods at work

Disclaimer:
Permission to use, copy, and distribute this software, and It’s documentation for any non-commercial purpose is hereby granted without fee, provided: THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL Henrik Vestermark, BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Regular expression testing App

This app allows you to test regular expressions before using them, ensuring they provide the desired outcomes. Simply enter your regular expression in the input field, specify any modifiers, and input the text you want to test for matches. You can also enter a second regular expression to test simultaneously against the same text. Press the 'Match' button to execute, and the Matching Results section will list any matches found. This dual-testing feature allows for more thorough validation of your regular expressions.

Regular Expression vs. 1.8 Type in your regular expression for testing: 
//
//
//
Enter your test string(s) for matching:
Matching or Optimizing result:



  • Result
  • Decomposing
  • Optimizing
  • Help

JavaScript Regular Expressions Guide

Modifiers

Modifier Description
i Perform case-insensitive matching
g Perform a global match (find all matches rather than stopping after the first match)
m Perform multiline matching

Brackets

Expression Description
[abc] Find any character between the brackets
[^abc] Find any character NOT between the brackets
[0-9] Find any digit between the brackets
[^0-9] Find any non-digit NOT between the brackets
(x|y) Find any of the alternatives specified

Groups

Group Type Description
(...) Matches the enclosed pattern and captures it (Capturing group).
(?:...) Matches the enclosed pattern but does not capture it (Non-capturing group).
(?=...) Lookahead assertion: Matches a group after the main expression without including it in the result.
(?!...) Negative lookahead assertion: Specifies a group that cannot match after the main expression if the result is to be successful.
(?<name>...) Matches the enclosed pattern and assigns it to a named group.
(?<=...) Lookbehind assertion: Matches a group before the main expression without including it in the result.
(?<!...) Negative lookbehind assertion: Specifies a group that cannot match before the main expression if the result is to be successful.

Quantifiers

Quantifier Description
n+ Matches any string that contains at least one n
n* Matches any string that contains zero or more occurrences of n
n? Matches any string that contains zero or one occurrence of n
n{X} Matches any string that contains a sequence of X n's
n{X,Y} Matches any string that contains a sequence of X to Y n's
n{X,} Matches any string that contains a sequence of at least X n's

Meta characters

Meta character Description
. Find a single character, except newline or line terminator
\w Find a word character
\W Find a non-word character
\d Find a digit
\D Find a non-digit character
\s Find a whitespace character
\S Find a non-whitespace character
\b Find a match at the beginning/end of a word
\B Find a match not at the beginning/end of a word
\0 Find a NULL character
\n Find a newline character
\f Find a form feed character
\r Find a carriage return character
\t Find a tab character
\v Find a vertical tab character
\xxx Find the character specified by an octal number xxx
\xdd Find the character specified by a hexadecimal number dd
\uxxxx Find the Unicode character specified by a hexadecimal number xxxx

Rate this page

Click on the stars below to rate this page

Low
a Star
a Star
a Star
a Star
a Star
High


Corrections:
30-Sep-2024 Vs 1.8 Improved Optimizer
17-Sep-2024 Vs 1.7 Improved decomposition analysis and added optimization suggestion in a new button and tab called Optimize
25-Aug-2024 Vs 1.6 Added an optional second regular expression line to be tested simultaneously plus updated the help section
17-Aug-2024 Vs 1.5 Added more samples and introduce decomposing of regular expression
19-Nov-2020 Vs 1.4 Added multiline matching
17-Nov-2020 Vs 1.3 Fix a bug in reporting illegal regular expressions
23-Dec-2019 Vs 1.2 Fix a bug in retrieving the history of regular expressions
28-Oct-2019 Vs 1.1 Redesign the GUI Interface
25-Apr-2018 Vs 1 Initial release