Good article about regexp on Sublime text
sublime text regular expression
sublime text find first number
regexp
for: .+
what: \t - $0
So, that works in this instance! But why and how? Let’s break it down:
- [ ] Whatever expression is inside these brackets will match ONE character.
- [a-z] This expression means “ONE character that is any lowercase letter, a through z.”
- [A-Z] This expression means “ONE character that is any uppercase letter, A through Z.”
- The “space” in between these two expressions is a literal “space” character.
- ( ) Parenthesis surrounding an expression make a “group”. Groups can be referred to by variables. In this case we defined two groups. Without any effort on your part, these groups are numbered, starting with variable “1” on the left-most group and counting upward to the right. This will come in handy when we fill in the REPLACE field.
Get only first group of numbers numbers
Find.: ([0-9].*[0-9])*([A-z])
For.: $1
Nenhum comentário:
Postar um comentário