softbless
asked on
Regex for full name
I need a regex for full name :
Only allow alpha numeric character (letter) and space.
Only allow alpha numeric character (letter) and space.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, wrong post. I think my phone hates me. ; )
ASKER
thanks
>> @" value=' . *'"
>> why @ here?
I don't see where I used it, but the @ in front of a string literal turns the string into a raw string where backslashes are literal characters and not the escape character that they normally are.
Pattern explanation : ( ? < = I N P U T [ ^ > ] * ? v a l u e = [ \ " ' ] ? ) [ ^ \ " ' > ] *
(?<= ... ) Positive lookbehind; find this, but don't consider it part of the match
INPUT literal
[^>]*? zero or more ( * ) of any chacter NOT ( [^ ... ] ) a closing bracket ( > ). Non-greedy ( ? ), so stop searching at the first match
value= literal
["']? zero or one ( ? ) of either ( [ ... ] ) a single or double quote. Note, the backslash is an escape for the doble quote and not part of the pattern
[^"'>]* zero or more ( * ) of any character NOT ( "[^ ... ] ) a single or double quote or a closing bracket. Again, the double quote is escaped