SRL - Simple Regex Language
Regular Expressions Made Simple

Flags

Flags apply to the whole expression generated and can be included at any point. It mostly makes sense to either add them on the beginning or the end of the query to not confuse the reader.

case insensitive

case insensitive

By default, regular expressions are case sensitive. That means, if you supply something like letter or literally it's important that the case matches. literally "foo" won't match FOO. Using the case insensitive flag however, will tell the engine to ignore case mismatches.

Example query:

letter from a to b twice, case insensitive

Test Input

Run Query!

SRL Query is matching!

SRL Query is not matching.

The SRL Query contains an error:

Whoops... you may have found a bug.

Generated Regular Expression:


        

multi line

multi line

If you want to match more than one line, supply the multi line flag. This will make the must end and begin with anchors

match the end/beginning of one line, instead of the complete string.

all lazy

all lazy

Matching in regular expression is greedy by default, meaning it will try to match the last occurrence. You can force this on a single quantifier by using the first match statement. If you want this to apply to the whole expression, use all lazy.

In the example below, you can see that each letter is a new match. If you try removing the all lazy flag, it will match until the end of the word.

Example query:

capture(letter once or more) all lazy

Test Input

Run Query!

SRL Query is matching!

SRL Query is not matching.

The SRL Query contains an error:

Whoops... you may have found a bug.

Generated Regular Expression: