Skip to content

Tag Archives: java-regular-expression

Given a file as input.txt containing some email ids which are mixed with other data. The task is to read this input file line by… Read More
Given an IP address, the task is to validate this IP address with the help of Regular Expressions.The IP address is a string in the… Read More
Given a string and a character, the task is to make a function that counts the occurrence of the given character in the string using… Read More
toString() method of a Pattern class used to return the string representation of this pattern. This return the regular expression from which this pattern was… Read More
splitAsStream() method of a Pattern class used to return a stream of String from the given input sequence passed as parameter around matches of this… Read More
asPredicate() method of a Pattern class used to creates a predicate object which can be used to match a string.Predicate is a functional interface and… Read More
split(CharSequence, int) method of a Pattern class used to splits the given char sequence passed as parameter to method around matches of this pattern.The array… Read More
quote(String) method of a Pattern class used to returns a literal pattern String for the specified String passed as parameter to method.This method produces a… Read More
split(CharSequence) method of a Pattern class used to splits the given char sequence passed as parameter to method around matches of this pattern.This method can… Read More
Given a string, move all Uppercase alphabets char to the end of the String.  Examples:  Input : Geeksforgeeks A Computer Science Portal for Geeks!! Output… Read More
In this article, we will learn how to move all special char to the end of the String. Examples:  Input : !@$%^&*AJAY Output :AJAY!@$%^&* Input :Geeksf!@orgeek@s… Read More
Given a string , the task is to remove all the consonants from the string and then print the string. Examples:   Input: str= “Welcome to geeksforgeeks” Output:… Read More
Regular Expressions or Regex is an API for defining String patterns that can be used for searching, manipulating, and editing a text. It is widely… Read More
Web server log which maintains a history of page requests, typically appended to the end of the file. Information about the request, including client IP… Read More
Given a string, your task is to remove the whitespaces in the string using Java Regex (Regular Expressions). Examples Input : Hello Everyone . Output… Read More

Start Your Coding Journey Now!