JavaScript Regular Expressions Coding Practice Problems
Last Updated :
01 Feb, 2025
Improve
Regular expressions (regex) in JavaScript provide a powerful way to search, match, and manipulate text patterns. They are widely used in form validation, data extraction, text filtering, and pattern recognition. This curated list of regex-based coding problems is categorized into easy, medium, and hard levels to help you strengthen your regex skills.
Regex Practice Problems
Easy
- Extract the Number from the String
- Print Bracket Number
- Compare two fractions
- Playing with mobile numbers
- Consonants and Vowels check
- Check if a string is Isogram or not
- Check String
- Check Binary String
- Prime String
- Panagram Checking
- Check if date is valid
- Palindrome
- Extraction of secret message
- Extract Maximum
- Parenthesis Checker
- The Pattern Matcher
- Good or Bad string
- Remove Space
- Remove vowels from string
- Remove consonants from a string
- Remove characters from alphanumeric string
- Convert a list of characters into a String
Medium
- Validate an IP Address
- CamelCase Pattern Matching
- Counting number of sentences and words
- Print first letter of every word
- Generate IP Addresses
- Merging Details
- Palindromic Strings
- Upper Case Conversion
- Tom and String
- Print Anagrams Together
- Remove leading zeros from an IP address
Hard
- RegEx matching
- Design a tiny URL or URL shortener
- Longest Palindrome in a String
- Pallindrome Patterns
- Find all possible palindromic partitions