Consider the sentence,
“please stop listening to your music, for a moment”.
Suppose that we wish to make a list of strings that can replace the word stop in the sentence above to produce a sentence that has the same meaning, but a different syntax.
How might we write a regex for these words?
- bar
- block
- break off
- cease
- check
- conclude
- desist from
- desist with
- discontinue
- drop
- end
- finish
- give up
- halt
- layoff
- letup
- pause
- quit
- refrain from
- relinquish
- renounce
- retire from
- stop
- surrender
- terminate
- withdraw from
Here is one regular expression, but it is not the only option…
(bar)|(block)|(break off)|(cease)|(check)|(conclude)|(desist from)|(desist with)|(discontinue)|(drop)|(end)|(finish)|(give up)|(halt)|(layoff)|(letup)|(pause)|(quit)|(refrain from)|(relinquish)|(renounce)|(retire from)|(stop)|(surrender)|(terminate)|(withdraw from)