Java Regex – Logical Operators Java Regex – Examples of Logical Operators ”; Previous Next Following are various examples of Logical Operators using regular expression in java. Sr.No Construct & Matches 1 XY X followed by Y. 2 X|Y Either X or Y. Print