Useful Regular Expression pattern

Let’s me note about regular expression to use at many programming.

To get all domain of anchor link

http://[^/"]*

 

To get full url of anchor link

http://[^"]*

 

To get full url http or https of anchor link

grep -Eo 'https?://[^/"]*'

 

To get image html tag

<img +src *= *[\"'](.+)[\"']

 

To get value inside html tag

<\s*p[^>]*>([^<]*)<\s*\/\s*p\s*>

 

I will update more.

Easy to use and Happy Hacking!.