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? -
Voxera113887y@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
-
Voxera113887yand 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
Any JavaScript RegEx experts care to help please??
random
js
regex