I have this regex as follows
/^\S(?=.*[a-z])(?=.*[A-Z])(?=.{8,})(?=.*[0-9])\S
it does most of what's its suppose to do such as must be eight characters long have at least one uppercase character one lowercase and one number however the problem is that it accepts any special characters at the end of the string even it passes the other validation i can't have this can someone modify this regex that it keeps the same functionality mentioned before but does not accept any special characters at all. Oh this is for php and javascript i use this both for client side and server side validation of a password any clues as to where the regex fails is greatly appreciated.