gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
what regex in sublime text matches letters but not numbers?
- User
what regex in sublime text matches letters but not numbers?
- Assistant
In Sublime Text, if you want to match letters (both uppercase and lowercase) but not numbers, you can use the following regex:
[a-zA-Z]This regex pattern matches any single letter from
atozor fromAtoZ.If you want to match multiple letters (i.e., a sequence of letters), you can use:
[a-zA-Z]+This will match one or more consecutive letters.
If you're using case-insensitivity in your search, you can also use:
\p{L}This pattern matches any character that is considered a letter in Unicode, which includes letters from various languages, rather than just the English alphabet.
Make sure to enable the "Regular expression" option in Sublime Text's find panel to use these patterns effectively.