Validate Variable Names According to Naming Conventions in Java
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....
read more
Program to insert dashes between two adjacent odd digits in given Number
Given a large number in form of string N, the task is to insert a dash between two adjacent odd digits in the given number in form of strings....
read more
Check if a number is binary or not in Java
Given a number N, the task is to check first whether the given number is binary or not and its value should be greater than 1. print true if N is the binary representation else print false....
read more
How to validate Indian driving license number using Regular Expression
Given string str, the task is to check whether the given string is a valid Indian driving license number or not by using Regular Expression.The valid Indian driving license number must satisfy the following conditions:...
read more
How to validate Visa Card number using Regular Expression
Given a string str, the task is to check whether the given string is a valid Visa Card number or not by using Regular Expression. The valid Visa Card number must satisfy the following conditions:...
read more
How to validate CVV number using Regular Expression
Given string str, the task is to check whether it is a valid CVV (Card Verification Value) number or not by using Regular Expression. The valid CVV (Card Verification Value) number must satisfy the following conditions:...
read more
Program to remove HTML tags from a given String
Given a string str that contains some HTML tags, the task is to remove all the tags present in the given string str....
read more
How to validate IFSC Code using Regular Expression
Given string str, the task is to check whether the given string is a valid IFSC (Indian Financial System) Code or not by using Regular Expression. The valid IFSC (Indian Financial System) Code must satisfy the following conditions:...
read more
How to validate GST (Goods and Services Tax) number using Regular Expression
Given string str, the task is to check whether the given string is a valid GST (Goods and Services Tax) number or not using Regular Expression. The valid GST (Goods and Services Tax) number must satisfy the following conditions:...
read more
Move all special char to the end of the String
In this article, we will learn how to move all special char to the end of the String....
read more
Print first letter of each word in a string using regex
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 lower case characters a-z or A-Z. Examples:...
read more
How to Reset the Pattern of a Regular Expression?
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 internal state of the Pattern object or use it again with a different input string. This helps to improve efficiency in instances where pattern matching occurs often by avoiding the need to recreate the Pattern object numerous times....
read more