Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Regex for Matching Specific characters excluding or include some characters

Answer»

Regex for MATCHING Specific characters excluding or INCLUDE some characters
Here we will GET regex matching characters and exclude some specific characters. We can either exclude or include some characters. Below i have mention 6 case 3 need to match and 3 need to skip

(4)Excercise :- Matching Specific Characters
Task Text
Match can
Match man
Match fan
Skip dan
Skip ran
Skip PAN

2.

Other Special Character

Answer»

Other Special Character
Write down regex for special character as we know that for digit we use " d" for WHITESPACE we use " s" for alphanumeric LETTER and digits we use " w" and " D" any non digit character. For " S" any non whitespace character and for " W" any non alphanumeric. For special metacharacter we use " b". Write down regex for 3 below lines.

(15)Write Regex for Special Character
Task Text
Match The quick BROWN FOX JUMPS over the lazy dog.
Match There were 614 instances of students getting 90.0% or above.
Match The FCC had to censor the network for saying &$#*!.

3.

Regex introduction about the Wild Character The Dot third chapter

Answer» REGEX introduction about the Wild Character The Dot third chapter
Here we will get regex MATCHING character with The Dot (.) which will match with single character letter, DIGIT, whitespace or EVERYTHING there can be more then one character also

(3)Excercise :- Matching The DOT
Task Text
Match cat.
Match 896.
Match ?++.
4.

Regex to Match Start and End in string

Answer»

Regex to MATCH Start and End in string
Here we will learn how to write Regex where we wolud know the start and the end words for any given string here we will use 2 characters. For start we will use (^) and for end we will use ($). So TRY below conditions match 1 and skip 2 from below problems. By using the above LOGIC.

(5)Excercise :- Matching Specific Characters
Task Text
Match Mission: SUCCESSFUL
Skip Last Mission: unsuccessful
Skip Next Mission: successful upon capture of target

5.

Match Groups

Answer»

Match Groups
Here in this regex we will match the START and end of FILES and these files can be image or can be some other types. In below files we need to map two case and SKIP the 3rd ONE.
(11)Excercise :- Matching Group
Task Text
Match file_record_transcript.pdf
Match file_07241999.pdf
Skip testfile_fake.pdf.tmp

6.

Regex for occurance of any character in range 0 to n

Answer»

Regex for occurance of any character in range 0 to N
Here we will do the same as we done in excercise 6 but here range of character can be 0 to n numbers logic is same as we done in previoud chapter. Here i have GIVEN 4 task 3 for match and 1 for skip as given below.


(7)Excercise :- Repeatance Specific Characters
Task Text
Match zzzyxx
Match zzyyyyx
Match zzxx
SKIP z

7.

Regex Whitespace Handling

Answer» REGEX Whitespace Handling
Here in this regex we will HANDLE the whitesapce to handle this whitespace we will USE " s" to handle this. And if whitespace is more then 1 then we will use "+" after " s" and to hanlde "." single character we will use " .". Now WRITE regex for below 3 and skip the 4th one

(9)Excercise :- Handle Whitespace
Task Text
Match 1. abc
Match 2. abc
Match 3. abc
SKIP 4.abc
8.

Regex introduction 2nd step and matching Digits

Answer» REGEX introduction 2nd step and matching Digits
As we KNOW numbers are in between 0-9 characters we can use /d for any digit from 0 to 9. Below are the 3 PATTERN are displayed PUT your answer in below textbox this will provide you a hint of answer

(1)Excercise :- Matching Digits
Task Text
MATCH abc123xy
Match define "123"
Match var g=123;
9.

Nested Groups

Answer»

Nested GROUPS
When we are working with complex data then we have to handle multiple layers of layers which can result in nested groups. In below regex we need TEST a specified type of text as given in below EXAMPLE

(12)Excercise :- Nested Groups
Task Text
Match JAN 1987
Match May 1969
Match Aug 2010

write an expression that matches and captures both the full date, as well as the year of the date.

10.

More Group Work

Answer»

More GROUP Work
Here we will to write some regex where some VALUES are repeted or we can say group of DIGIT then some character and then again the digits. Here we can use non-capturing groups. Below are the 3 CONDITION for which we need to write regex

(12)Excercise :- Nested Groups
Task Text
Match 1280x720
Match 1920x1600
Match 1024x768

11.

Conditional Regex

Answer»

Conditional Regex
When we had condition to select or not or choose some values as OPTIONAL . For example we have values are "Car|Scooter|Cycle" here we can USE "or". You have to write for below regex where you need to match 2 values and need to SKIP 2 values.

(14)conditional :- Optional OR
Task Text
Match i Love Hat
Match i Love Rat
Skip i Love Led
Skip i Love BED

12.

Regex Tutorial

Answer» REGEX Tutorial
Regex introduction first STEP and MATCHING Characters
Here we will get Regex Matching Character this is a introduction and the ABCs character matching. Below is the DIFFERENT pattern that matches all 3 rows below define. Write some Regex for matching below 3 lines and you also have the solution write below of the textbox

(1)Excercise :- Matching Characters
Task Text
Match abcdefg
Match abcde
Match ABC
13.

Optional Charcters

Answer»

Optional Charcters
Optional Characters in Regex here we will WRITE some Regex where some of the text are common in all VALUES but some of the values are different in all the options. As per given below please map values with first 3 and SKIP for the 4th one

(8)EXCERCISE :- Optional Characters
Task Text
MATCH 1 Files Copied?
Match 2 Files Copied?
Match 24 Files Copied?
SKIP No Files Copied.

14.

Regex for repeat of some character

Answer»

Regex for repeat of some character
Here we will learn how to handle and repeat occurance of any character wheather it is numeric or alphanumeric here we will USE {3} . It will do occurance upto to 3 times. And we can also SET range here like {3,5} this means number can in between 3 to 5. Now we will take example here a{3-5} means it can be aaa,aaaa or aaaaa. Now look at below 3 task 2 need to match and one need to skip


(6)Excercise :- Repeat of SPECIFIC Characters
Task Text
Match patttttz
Match patttz
SKIP patz

15.

Regex for doing Character Ranges

Answer» REGEX for doing CHARACTER Ranges
Here in this regex we will USED RANGE for specific characters which can either a-z or we can use range of 0-9 here we have used only alphanumeric charcters(LOWER vs upper case). Below from 6 case 3 need to match and 3 need to skip

(5)Excercise :- Matching Specific Characters
Task Text
Match Ana
Match Bob
Match Cpc
SKIP aax
SKIP bby
SKIP ccz