Regex syntax clarification. Examines all pieces of regex syntax that start with (?.
Rubular is a Ruby-based regular expression editor and tester. It’s a handy way to test regular expressions as you write them. Rubular is an especially good fit for Ruby and Rails developers, since it uses Ruby on the server to evaluate regexes, but should also be useful for those working in other programming languages and frameworks (Java, PHP, …
ruby: Capitalized variables contain constants and class/module names. By convention, constants are all caps and class/module names are camel case.
Escapes any characters that would have special meaning in a regular expression. Returns a new escaped string, or self if no characters are escaped.
EDIT: As requested, let me try to explain groups too. Well, groups serve many purposes. They can help you to extract exact information from a bigger match (which can also be named), they let you rematch a previous matched group…
Stack Overflow for Teams. A private, secure home for your team’s questions and answers. Learn more
Atomic Grouping. An atomic group is a group that, when the regex engine exits from it, automatically throws away all backtracking positions remembered by any tokens inside the group.