try this
str.matches(".*\\d.*");
More Related Contents:
- Regex for converting xml tags key to camel case
- How to split a string if any chracter is found in java
- Java: splitting a comma-separated string but ignoring commas in quotes
- Splitting a Java String by the pipe symbol using split(“|”)
- Split string to equal length substrings in Java
- Split string with dot as delimiter
- How to extract a substring using regex
- Java how to replace 2 or more spaces with single space in string and delete leading and trailing spaces
- Splitting a string at every n-th character
- Why does String.split need pipe delimiter to be escaped?
- Using Java to find substring of a bigger string using Regular Expression
- Get the index of a pattern in a string using regex
- Java – Best way to grab ALL Strings between two Strings? (regex?)
- How to use regex in String.contains() method in Java
- Compare one String with multiple values in one expression
- Replace the last part of a string
- Remove trailing zero in Java
- Extract string between two strings 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)?
- Java String.split() Regex
- Remove all empty lines
- Check if string ends with certain pattern
- Java String.replace/replaceAll not working
- Remove all non-“word characters” from a String in Java, leaving accented characters?
- How to implement a SQL like ‘LIKE’ operator in java?
- Raw Strings in Java – for regex in particular. Multiline strings
- String.replaceAll is considerably slower than doing the job yourself
- Remove all occurrences of \ from string
- Replacing single ‘\’ with ‘\\’ in Java