how do i match n character of a string using regular expression?..for example i got a string charmed,i want at least 4 character matched with exact position,so that if i keyed in cracked,the expression will return true.any advice will be much appriciated.thanx.
maybe i didn't put the question right.i don't want to determine the number of character matched.now..i have a string,$mystring=charmed.and user will be ask to enter an input(a string of course),$input..and my program will determined if $input matched with $mystring.if it matched,my program will return true.$input will be consider matched if at least 4 or all of the character in $input matched with $mystring..for example if user key in cracked,then my program will return true...hope this is clear enough.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.