Two options:
Firstly, you can escape it using a backslash — \(
Alternatively, since it’s a single character, you can put it in a character class, where it doesn’t need to be escaped — [(]
More Related Contents:
- split US phone number in java? [closed]
- Regular expression for SSN and phone number [closed]
- Regex for converting xml tags key to camel case
- How do i find the first un-escaped quotes in Java?
- Specific String validation using regex
- Regexp Java for password validation
- Create array of regex matches
- Split string into array of character strings
- Regex Named Groups in Java
- List of all special characters that need to be escaped in a regex
- Regular expression to match URLs in Java
- Using Java to find substring of a bigger string using Regular Expression
- Regex date format validation on Java
- Remove trailing zero in Java
- Are non-capturing groups redundant?
- How to match “any character” in regular expression?
- Can I improve performance of this regular expression further
- How exactly does String.split() method in Java work when regex is provided?
- method matches not work well [duplicate]
- Regular expression matching fully qualified class names
- Catastrophic backtracking shouldn’t be happening on this regex
- Character class subtraction, converting from Java syntax to RegexBuddy
- Java regex to match start/end tags causes stack overflow
- Java String.replace/replaceAll not working
- Advanced Wildcard Mappings Parameters not found in Prepare() method
- How to implement a SQL like ‘LIKE’ operator in java?
- Raw Strings in Java – for regex in particular. Multiline strings
- Regular Expressions on Punctuation
- Split string into repeated characters
- java regular expression to match file path