I would like to build a regular expression for replacing a sentence with "per" when it should be (a readable version of a sentence with quantities).
That is:
- "3/unit" must match
- "unit/3" must match
- "feet/second" must match
- "05/07" must not match
I know how to create something like "\D+/\D+". But how can I build a regex saying "not both right and left expressions match \D+" ?