Skip to content

Tag Archives: regular-expression

Given a string S, the task is to move all the digits present in the string, to the beginning of the string. Examples: Input: S… Read More
Given a string S, the task is to find and extract all the URLs from the string. If no URL is present in the string,… Read More
Given a string str, the task is to extract the substrings present between two delimiters, i.e. ‘[‘ and ‘]’. Examples: Input: str = “[This is… Read More
Prerequisite – Introduction of Finite Automata Non-Deterministic Finite Automata and ∈-Non-Deterministic Finite Automata are almost the same except for their transition function and there are… Read More
State Elimination Method : Rules to convert a DFA/NFA//Ɛ-NFA into corresponding Regular Expression. Arden’s Method is not capable of converting Ɛ-NFA. By state elimination method… Read More
Given a string str of length N and a substring pattern of length M, the task is to find the frequency of occurrences of pattern… Read More
Given a string email that denotes an Email Address, the task is to check if the given string is a valid email id or not.… Read More
Given string str of length N, the task is to remove uppercase, lowercase, special, numeric, and non-numeric characters from this string and print the string… Read More
Given string str of length N, the task is to check if the given string contains only special characters or not. If the string contains… Read More
Given string str of length N, the task is to check whether the given string contains uppercase alphabets, lowercase alphabets, special characters, and numeric values… Read More
In Python, one could easily check the presence of a text string within another string. But, in some scenarios, we may not have the exact… Read More
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… Read More
Given a string str which has various HTML Entities in it, the task is to replace these entities with their corresponding special character. HTML entity… Read More
Given a string in camel case, the task is to write a Java program to convert the given string from camel case to snake case… Read More
Given numeric string str, the task is to remove all the leading zeros from a given string. If the string containing only zeros, then print… Read More