I have been trying unsuccessfully to mirror text that only matches “a-z0-9” using the following code:
${1/[a-z]/$0/}${1}
After the snippet has been tab triggered I would expect to type “$test” and see “test” mirrored.
Any clues?
Many thanks!
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.
The snippet beneath removes all $, % and ? from either beginning or end of your text. Note that the regular expression is added and applied to the mirror, not to the input itself.
If you want to exclude more characters, add those to each class (escape them if necessary).