If you want to learn, how to use regex, I recommend the following
- read your lecture notes
- read a Java book (especially the chapters about “Pattern” and “regular expressions”)
- read the Java documentation, e.g. about Pattern
More Related Contents:
- Java Regex to Validate Full Name allow only Spaces and Letters
- Regex date validation for yyyy-mm-dd [duplicate]
- Java Variable Substitution
- Remove HTML tags from a String
- What do ^ and $ mean in a regular expression?
- Java string split with “.” (dot) [duplicate]
- Spring MVC: How to perform validation?
- String.replaceAll(regex) makes the same replacement twice
- Rationale for Matcher throwing IllegalStateException when no ‘matching’ method is called
- Regular expression with variable number of groups?
- Is it possible to match nested brackets with a regex without using recursion or balancing groups?
- Escaping special characters in Java Regular Expressions
- How to split String with some separator but without removing that separator in Java? [duplicate]
- Java regex for support Unicode?
- How to check for a valid URL in Java?
- How to escape comma and double quote at same time for CSV file?
- Tokenizing Error: java.util.regex.PatternSyntaxException, dangling metacharacter ‘*’
- Can you use zero-width matching regex in String split?
- RegEx in Java: how to deal with newline
- How to validate XML against XSD 1.1 in Java?
- Pattern to extract text between parenthesis
- What are the differences between perl and java regex capabilities?
- repaint() in Java [duplicate]
- Regex search with pattern containing (?:.|\s)*? takes increasingly long time
- Java Regex – Using String’s replaceAll method to replace newlines
- Replace a String between two Strings
- Does Pattern.compile cache?
- Regex to remove spaces between numbers only
- Regex Pattern Catastrophic backtracking
- Print regex matches in java