Tag: java regular expressions

Java Regular Expressions – 3

Character Classes If we browse through java regular expressions, we immediately find a table summarizing regular expression constructs. Yes, that’s what we are going to see here. In below table, the left-hand column specifies the regular expression constructs, while the right-hand column describes the conditions under which each construct will match. Construct Description [abc] a, […]

Java Regular Expressions – 2

String Literals The most basic form of pattern matching is form of String matching. The pattern here is nothing but a simple string search we want to perform on the given input string. From here, let’s take String replace method which accepts a regularExpression and replacementString as arguments. Metacharacters These are the special characters that […]

Java Regular Expressions – 1

What is Java Regular Expressions? From Oracle, it says “Regular expressions are a way to describe a set of strings based on common characteristics shared by each string in the set.” In order to define that common characteristics, we prepare a sequence of characters called ‘Pattern’. These patterns can be used to search, edit, or […]