I would like to combine the whole word "word" - one that starts with a number character and can contain special characters, but does not end with "%".
Match these:
- 112 (integers)
- 10-12 (ranges)
- 11/2 (fractions)
- 11.2 (decimal numbers)
- 1,200 (thousand separator)
but not
- 12% (percent)
- A38 (words starting with an alphabetic character)
I tried these regular expressions:
(\b\p{N}\S)*)
but returns '12% 'to '12%'
(\b\p{N}(?:(?!%)\S)*)
but returns' 12 'at '12%'
Can I make an exception for a term \Sthat ignores %? Or will you have to do something else?
I will use it in PHP, but just write as you would like, and I will convert it to PHP.