+ 1

How to generate random email address using regex in Java?

How to generate random email address using regex in Java? Passing regex as an argument to method.

6th Jan 2020, 2:46 PM
TheEngineerIN
TheEngineerIN - avatar
4 Respostas
+ 1
TheEngineerIN Not perfect because it's programmed quickly: https://code.sololearn.com/ctWUxaXQj4Mb/?ref=app
6th Jan 2020, 10:25 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
If I remember correctly, you asked a while ago how to create a random string using regex. What's the difference to an email address? Can you explain exactly what is causing you problems?
6th Jan 2020, 6:09 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Denise Roßberg , I agree with your point. But the Q. Is I'm unable to pass an argument as regex mentioned below in shared script by you Regex: ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$
6th Jan 2020, 7:04 PM
TheEngineerIN
TheEngineerIN - avatar
0
I hope this code helps you to get a feeling how your email have to looks like to match the pattern. https://code.sololearn.com/c8MnTDULmsw9/?ref=app
6th Jan 2020, 9:36 PM
Denise Roßberg
Denise Roßberg - avatar