Test your knowledge!Take a quiz to access yourself.

Regex Assessment

It’s not cakewalk to become master in RegEx. One has to have a deep understanding of what value each meta-character retains which also demands a lot of practice. More tough it becomes to judge the level of understanding. I mean, one can write multiple regex to match a single text. A person who doesn’t only write regex that matches the given text but also pushes him to make it smart one which triggers least on unexpected text, so called False positives.

It’s time to test how high you stand when it comes to understanding of Regex.

This Regex Assessment will tell you about your level of understanding of Regex. There are only 7 questions covering almost everything explained in Regex related Posts(Search for regex in search bar).

Note: There is no negative marking here.

Best Of Luck!! Cheers!!

Please enter your email:

1. What does <pattern1>(?:<pattern2>) means?

 
 
 
 

2. What does \b mean?

 
 
 
 

3. Right pattern to make sure string “cookie” comes within 50 characters ahead of string “talent” is:

 
 
 
 

4. Right pattern to match the followings:

  1.  12 files found?
  2. 1 file found?
  3. 256 files found?

But not the following:

  1. 0 file found?
  2. No file found.

 

 
 
 
 

5. A pattern that will match the following:

  1. file_attched_cibc.pdf
  2. file_234123.pdf

But not on these:

  1. file_234.xml
  2. file2_e34.pdf
  3. textfile_file.pdf
  4. file_next.pdf.hello
 
 
 
 

6. I need a regex that will match lines like:

  1. ____123
  2. __12345
  3. 1234567

the maximum length of a string is 7 and that string can contain only digits and underscores at the beginning. but none of these:

  1. _1237_
  2. _______
  3. 123895
  4. 5_123895
  5. 12389555
 
 
 
 

7. Correct regex that matches on:

  1. |hello
  2. apple
  3. test||test

but not on:
||hello

In other way of saying, match for the “|” symbol, but only if it starts with a single “|”.

Note: There may be multiple answers to this question.

 
 
 
 

Question 1 of 7