at night, after saying my prayers, i typically count sheep to help me fall asleep. i want a regular expression to help me with the correct count. i want the following strings to match
0
1sheep
2sheepsheep
3sheepsheepsheep
and so on.
what is the regular expression for this?
something like '(\d+)(sheep){\1}'
if {\1}
would do what i want it to do
what if i count my sheep in pairs (1sheepsheep
and 2sheepsheepsheepsheep
), what would the regular expression be then?