You can use .*[a-zA-Z]+.*
with String.matches()
method.
boolean atleastOneAlpha = s.matches(".*[a-zA-Z]+.*");
More Related Contents:
- Java: splitting a comma-separated string but ignoring commas in quotes
- How do I convert from int to String?
- String’s Maximum length in Java – calling length() method
- How to convert comma-separated String to List?
- Java how to replace 2 or more spaces with single space in string and delete leading and trailing spaces
- Concatenating null strings in Java [duplicate]
- String Constant Pool
- Is it good practice to use java.lang.String.intern()?
- How to split a comma-separated string?
- Java, Calculate the number of days between two dates [duplicate]
- Why is String.chars() a stream of ints in Java 8?
- Get the index of a pattern in a string using regex
- How do I check that a Java String is not all whitespaces?
- Should I use string.isEmpty() or “”.equals(string)?
- Convert seconds value to hours minutes seconds?
- Understanding logic in CaseInsensitiveComparator
- Convert String to int array in java
- Copying to the clipboard in Java [duplicate]
- Performance penalty of String.intern()
- Can I get an enum based on the value of its field?
- Java String.substring method potential memory leak?
- Remove ✅, 🔥, ✈ , ♛ and other such emojis/images/signs from Java strings
- Java. Ignore accents when comparing strings
- How can I left-align strings using String.format()?
- Find all numbers in the String [closed]
- How to parse this string in Java?
- Is it possible in Java to override ‘toString’ for an Objects array?
- Sorting ArrayList of Objects by Object attribute
- How to use String.format() in Java? [duplicate]
- Extract digits from string – StringUtils Java