Let's Get Started
Welcome to the great world of SRL! SRL, or Simple Regex Language, is an easy to use language to form and build Regular Expressions. You no more have to struggle with odd characters and signs and worry if you've forgotten a +, . or \ somewhere. SRL is simple but powerful and helps you to prevent common mistakes. And in addition to that it saves you a lot of time since you don't have to learn how to write Regular Expressions any more.
But before we get started, a short note on what this project is not: SRL is not trying to replace Regular Expression. It is mainly thought for beginners and people who just have to write one or two regular expressions per year. It doesn't make sense for them to practise that complicated syntax.
There are a few basic syntax rules you should know before diving into it:
SRL is case insensitive. Thus,
LITERALLY "test"is exactly the same as
literally "test". But please beware, that everything inside a string is in fact case sensitive.
LITERALLY "TEST"does NOT equal
- The comma separating statements is completely optional and has no effect whatsoever. In fact, it gets removed before interpreting. But since it helps the human eye to distinct between different statements, it's allowed.
- Strings are interpreted as literal characters and will be escaped. They can either be defined using 'single' or "double" quotation marks. Escaping them using a backslash is possible as well.
- Parentheses should only be used when building a sub-query, for example while using a capture or non-capture group to, for example, apply a quantifier to multiple items.
- Comments are currently not supported and may be implemented in the future.
Using SRL Through the Website
Feel free to use SRL through the website to create your Regular Expressions. You're able to enter the Query on the following page and then receive the resulting Regular Expression which can be used in any language. This is definitely the simplest way of using SRL. But don't forget to supply the corresponding SRL in a comment next to where you're using the Regular Expression, since you then will be able to easily debug and understand it even a few days or weeks later.Build Your SRL Query Online
Using SRL as a Project Dependency