Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
https://regex101.com/r/DX0HRW/1 regex here
it should match @nuv.ac.in in a string and it is working, perfect, but it is also working if the given string is @nuv.ac.innnnnnnnn and so on
any expert help perhaps? -
Voxera108838y@dextel2 the @ is the key. Only one part matches that so only the part to the right of @ in the regex can match anything to the right in the string and no part of that right regex can match multiple n in the end -
Voxera108838yand since you do not end the regex with $ it can partially match the string, thats why the last row matches but the trailing n is white, its not part of the match.
Add $ in the end of the regex and it will not match the last one.
Related Rants

What only relying on JavaScript for HTML form input validation looks like
Found something true as 1 == 1
Any JavaScript RegEx experts care to help please??
random
js
regex