Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Strings
3.3K+ articles
Java Programs
2.0K+ articles
Searching
1.7K+ articles
Pattern Searching
623+ articles
Theory of Computation
299+ articles
Java-String-Programs
148+ articles
java-regular-expression
92+ articles
CPP-regex
39+ articles
regular-expression
881+ posts
Recent Articles
Popular Articles
Extracting Port Number from a localhost API Request to a Server using Regular Expressions
Last Updated: 14 March 2023
Given a String test_str as localhost API Request Address, the task is to get the extract port number of the service.Examples:Input: test_str = ‘http://localhost:8109/users...
read more
Strings
Pattern Searching
DSA
regular-expression
strings
Extracting Repository Name from a Given GIT URL using Regular Expressions
Last Updated: 08 March 2023
Given a string str, the task is to extract Repository Name from the given GIT URL.Examples:GIT URL can be any of the formats mentioned below:Input: str="git://github.com/b...
read more
Pattern Searching
DSA
regular-expression
Validating Indian currency data using Regular expressions
Last Updated: 09 January 2024
Given some Indian Currency Data, the task is to check if they are valid or not using regular expressions. Rules for valid Indian Currency Data are:Indian Rupee format: The...
read more
DSA
regular-expression
Regular Expression Matching
Last Updated: 21 September 2024
Given a text t and a pattern p where t consists of only lowercase English alphabets while p consists of lowercase English alphabets as well as special characters '.' and '...
read more
Dynamic Programming
Picked
DSA
Facebook
regular-expression
How to Convert a Java String Against a Pattern Regex?
Last Updated: 29 January 2024
Regular expressions, or "regex," are an effective tool in Java programming for checking texts against a given pattern. This post will walk you through the process of util...
read more
Java
Java Programs
Picked
java-regular-expression
Java-String-Programs
regular-expression
Java Examples
Validate Variable Names According to Naming Conventions in Java
Last Updated: 29 January 2024
Let's write a Java Program that checks whether a given variable name complies with the naming convention or not using Regular Expressions in Java. Example for Validating N...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Java Examples
Java - Remove White Spaces from String using Regex
Last Updated: 26 January 2024
The Regex is an expression that is used for searching a required pattern or matching a required pattern or Manipulating the input based on requirements by using regex. Thi...
read more
Java
Java Programs
Picked
Java-Strings
java-regular-expression
regular-expression
Java Examples
How to Replace All Occurings of String Using Regex in Java?
Last Updated: 31 January 2024
Regex in Java is an interesting way to search for patterns in a string that the user provides. Expanded as Regular Expressions, It consists of some patterns that can be pl...
read more
Java
Java Programs
Picked
Java-Strings
java-regular-expression
regular-expression
Java Examples
How to find the last index using regex of a particular word in a String?
Last Updated: 25 January 2024
To find the last index of a particular word in a string using regular expressions in Java, you can use the Matcher class along with a regular expression that captures the ...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Java Examples
How to Reset the Pattern of a Regular Expression?
Last Updated: 13 February 2024
A regular expression pattern in Java is defined using the Pattern class, which is a component of the java.util.regex package. But sometimes, we may wish to reset the inter...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Java Examples
Java Program to Find Occurrence of a Word Using Regex
Last Updated: 31 January 2024
Java's regular expressions, or regex, let you do advanced text manipulation and matching. Regex offers a handy approach for searching for a term in a text wherever it appe...
read more
Java
Java Programs
Picked
Java-Strings
java-regular-expression
regular-expression
Java Examples
Count a Group of Words in a String Using Regex in Java
Last Updated: 02 February 2024
Regular Expression is a powerful approach in Java for searching, Manipulating, and matching patterns with specific pattern requirements. In this article, we will learn to ...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Java Examples
Validate a Time Format (HH:mm:ss) Using Regex in Java
Last Updated: 31 January 2024
In this article, we will explore how to use regex to validate the used time format HH:mm:ss. Regular expressions (regex) offer a method, for validating time formats ensuri...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Capitalize the First Letter of a String in Java Using Regex
Last Updated: 02 February 2024
In Java, we can use regular expressions to make the first character of each word in Uppercase as the word is represented as a String and string is the collection of charac...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Java Examples
How to Match Phone Numbers in a List to a Regex Pattern in Java ?
Last Updated: 28 April 2025
Regular Expressions are also known as regex or regexp. It is one of the powerful features of Java that helps in sequences of characters that define a search pattern. Nowad...
read more
Java
Java Programs
Picked
java-regular-expression
regular-expression
Java Examples
1
2
3
4
...
59
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !