I don’t know anything about regex,but I need to tranform a variable ($name) to uppercase.
Does anybody know how to do it ?
Also, what is a good website for learning regex?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can try
The capture parens will find letters, and the
\Uescape sequence will apply theucfunction to the captured text in$1. The/gmodifier will repeat the match throughout the string.For a more generic regex you can try
…where it matches all characters, and
\1is the old style capture sequence.