Question: How would you create a regex that all the strings contain the following: Regex1. All strings containing 'abc' Sample valid: abc, hdgabcjs, nabc, *&abc Sample

How would you create a regex that all the strings contain the following:

Regex1. All strings containing 'abc'

Sample valid: abc, hdgabcjs, nabc, *&abc

Sample invalid: cdb, mabnndc, a-b-c.

Regex2. All strings containing 3 consecutive digits

Sample valid: abc123, 123bcd, 123, bc789de, 713, bcd826bd

Sample invalid: 321abcd, 6-54, *45bc9, 21

Regex3. All strings containing 3 non-consecutive digits

Sample valid: m8h2b6, 3m5nhhg9, abc8jd7dss2

Sample invalid: 764, ab, a2b5, abc123, 123bcd, 123, bc789de, 713, bcd826bd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!