We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Regex
  3. Repetitions
  4. Matching {x, y} Repetitions

Matching {x, y} Repetitions

Problem
Submissions
Leaderboard
Discussions
Editorial

The {x,y} tool will match between and (both inclusive) repetitions of character/character class/group.

For Example:

w{3,5} : It will match the character w , or times.
[xyz]{5,} : It will match the character x, y or z or more times.
\d{1, 4} : It will match any digits , , , or times.


Task

You have a test string .
Your task is to write a regex that will match using the following conditions:

  • should begin with or digits.
  • After that, should have or more letters (both lowercase and uppercase).
  • Then should end with up to . symbol(s). You can end with to . symbol(s), inclusively.

Note

This is a regex only challenge. You are not required to write any code.
You have to fill the regex pattern in the blank (_________).

Author

[deleted]

Difficulty

Easy

Max Score

20

Submitted By

36271

Need Help?


View discussions
View editorial
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy