So the journey for regex continues with practical examples as what we did in our previous write-up https://mohitdabas.wordpress.com/2019/01/04/my-regex-guide-with-examples-part-1/ .

https://regex101.com/ is the online tool I am using for regular expression analysis.

The first example will be a scenario where you need to find website address in a href attributes it may consist of HTTP or HTTPS types of address

\S + matches any non-whitespace character (equal to [^\r

\t\f\v ] )

The classic email validation method.

Okay, now a slight modification Suppose only a few of domains are allowed.

Capturing Group ( com | in ) only email ending with this domain are allowed

The Third example is showing a scenario where you have a chat and you need to find an affirmative response from the chats.

This example belongs to a simple name matching scenario. you have these three names and you need to match all of the three.

Get all the combinations and permutations of the word cat

Checking whether a URL is valid or not.

Finding a hostname from a given URLs

Extracting the path from a URLs

Extracting the query from URL (Except REST API style)

Extracting opening tags from HTML.

As I am learning I might some mistakes feel free to correct me and comment on this.