DEV Community

Cover image for REGEX (REGULAR EXPRESSIONS) WITH EXAMPLES
Faisal Ahmed
Faisal Ahmed

Posted on

4 2

REGEX (REGULAR EXPRESSIONS) WITH EXAMPLES

For testing Regular Expressions visit regexr.com website . It is an online tool.

Email Validation:
sample: google@gmail.com

/[a-zA-Z0-9_\-\.]+[@][a-z]+[\.][a-z]{2,3}/
Enter fullscreen mode Exit fullscreen mode

Bangladeshi Mobile Phone Validation:
sample: 8801412345678

/(\+88|88)(01)[3|4|5|6|7|8|9]{1}[0-9]{8}/
Enter fullscreen mode Exit fullscreen mode

Facebook id Validation:
sample: https://www.facebook.com/zuck

/(https:)?\/\/?(www\.)?facebook\.com\/[a-zA-Z0-9\.]*/
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay