Regex for rise/rising | SoloLearn: Learn to code for FREE!


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?

11/18/2018 2:48:02 AM

Farhan Ramli

2 Answers

New Answer


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: