+ 1
Regex for rise/rising
text = rise rising risi pattern to match only rise and rising. Must not match risi. I try pattern ris[e(ing)] and match rise and risi What is wrong there?
2 ответов
+ 2
The pattern you wrote will match rise, risi, risn, risg. When you use square brackets it's like saying "match ANY of the characters inside the sqare brackets.
What you need is: |
Regex you need is: ris(e|ing).
What is in paslranthesis means match: e OR ing
Read more about regex: https://stackoverflow.com/questions/4736/learning-regular-expressions
0
ris(e|ing)