Skip to content

Tag Archives: java-regular-expression

Mobile Number validation criteria: The first digit should contain numbers between 6 to 9. The rest 9 digit can contain any number between 0 to… Read More
Given a URL as string, we need to find if the given URL is valid or not. Input : str = "https://www.geeksforgeeks.org/" Output : Yes… Read More
Given a string, find if the given string is a valid email or not. Input : email = "review-team@geeksforgeeks.org" Output : Yes Input : email… Read More
Variants of matches() method is used to tell more precisely not test whether the given string matches to a regular expression or not as whenever… Read More
Given a string of 0 and 1, we need to check that the given string is valid or not. The given string is valid when… Read More
Given an alphanumeric string, extract maximum numeric value from that string. Examples: Input : 100klh564abc365bg Output : 564 Maximum numeric value among 100, 564 and… Read More
In Set 1, we have discussed general approach for counting the patterns of the form 1(0+)1 where (0+) represents any non-empty consecutive sequence of 0’s.In… Read More
Given a string, extract the first letter of each word in it. “Words” are defined as contiguous strings of alphabetic characters i.e. any upper or… Read More
Given a string, extract the first letter of each word in it. “Words” are defined as contiguous strings of alphabetic characters i.e. any upper or… Read More
Given a string, extract words from it. “Words” are defined as contiguous strings of alphabetic characters i.e. any upper or lower case characters a-z or… Read More
Given a string, remove the vowels from the string and print the string without vowels.  Examples:  Input : welcome to geeksforgeeks Output : wlcm t… Read More
Prerequisite- Regular Expressions in Java Boundary matches can help us find where in the string match is taking place. You can make your pattern matches… Read More
The string split() method breaks a given string around matches of the given regular expression. After splitting against the given regular expression, this method returns… Read More
Prerequisite: Regular Expressions in Java Quantifiers in Java allow users to specify the number of occurrences to match against. Below are some commonly used quantifiers… Read More
Regular Expressions or Regex (in short) in Java is an API for defining String patterns that can be used for searching, manipulating, and editing a… Read More

Start Your Coding Journey Now!