.* will match any characters in regular expressions
I think the java syntax would be
"digital".matches(".*ital.*");
And for the single character match just use a single dot.
"digital".matches(".*gi.a.*");
And to match an actual dot, escape it as slash dot
\.
More Related Contents:
- Java – escape string to prevent SQL injection
- Splitting on comma outside quotes
- Regex to match a C-style multiline comment
- Java string split with “.” (dot) [duplicate]
- Splitting a string at every n-th character
- How to split a string between letters and digits (or between digits and letters)?
- How can non-ASCII characters be removed from a string?
- How to extract numbers from a string and get an array of ints?
- How to split String with some separator but without removing that separator in Java? [duplicate]
- Java – Best way to grab ALL Strings between two Strings? (regex?)
- How do I convert CamelCase into human-readable names in Java?
- Check and extract a number from a String in Java
- Extracting pairs of words using String.split()
- What is the simplest way to convert a Java string from all caps (words separated by underscores) to CamelCase (no word separators)?
- Why String.replaceAll() in java requires 4 slashes “\\\\” in regex to actually replace “\”?
- Java: Split string when an uppercase letter is found
- Java String.split() Regex
- Remove all empty lines
- Split a string, at every nth position
- Java String.split() sometimes giving blank strings
- How to Split a mathematical expression on operators as delimiters, while keeping them in the result?
- Use Java and RegEx to convert casing in a string
- Java String ReplaceAll method giving illegal repetition error?
- Find all words with 3 letters with regex
- How can I remove punctuation from input text in Java?
- String.replaceAll is considerably slower than doing the job yourself
- Regular Expressions on Punctuation
- Split string into repeated characters
- Parse Date from String in this format : dd/MM/yyyy [to dd/MM/yyyy]
- Java replace all square brackets in a string