Question

3. Define the regular expression for: (5 points) A valid URL Solution: (5 points) A valid email address Solution: a. b.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Regular Expression for valid URL :

http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?

Regular Expression for valid email address :

/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([com\co\.\in])+$/;

or

\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

Explanation :

  • This expression says enter valid letter from a-z , A-Z and 0 t0 9 before @.
  • After @ enter domain name that contains a-z , A-Z and 0 to 9.
  • Followed with com or ,co or .in.
  • Example : [email protected]

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
3. Define the regular expression for: (5 points) A valid URL Solution: (5 points) A valid...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT