Regular Expressions Cheat Sheet PDF
Regular Expressions Cheat Sheet PDF
Predicate<String> asPredicate()
^ The beginning of a line.
Creates a predicate which can be used to match a string. GROUPS & BACKREFERENCES
$ The end of a line.
\b A word boundary. A group is a captured subsequence of characters which may
MATCHER be used later in the expression with a backreference.
\B A non-word boundary.
\A The beginning of the input. An engine that performs match operations on a character
sequence by interpreting a pattern. (...) Defines a group.
\G The end of the previous match. \N Refers to a matched group.
\Z The end of the input but for the final terminator, if any. boolean matches() (\d\d) A group of two digits.
\z The end of the input. Attempts to match the entire region against the pattern. (\d\d)/\1 Two digits repeated twice.
\1 Refers to the matched group.
boolean find()
PATTERN FLAGS Attempts to find the next subsequence of the input
Pattern.CASE_INSENSITIVE sequence that matches the pattern.
Enables case-insensitive matching. LOGICAL OPERATIONS
int start()
Pattern.COMMENTS XY X then Y.
Returns the start index of the previous match.
Whitespace and comments starting with # are ignored until the X|Y X or Y.
end of a line. int end()
Pattern.MULTILINE Returns the offset after the last character matched.
One expression can match multiple lines.
Pattern.UNIX_LINES LEARN HOW JREBEL AND XREBEL TRANSFORM
Only the '\n' line terminator is recognized in the behavior of ., ^, ENTERPRISE SOFTWARE DEVELOPMENT.
and $. Try for free at jrebel.com
www.jrebel.com