This is my regex
\d+%[^\.][^0-9]*?((?!original).)percentage*
And I want it to match from a percentage (i.e. 10%) until the word percentage
- 10% "whatever" percentage
except if it contains the word "original":
- 10% original percentage
So, "whatever" can be anything until the word "percentage" except if he word "original" is in it.
I've been able to get my regex but it only works correctly if "percentage" is at the beggining of the new line
In some cases, 10% of the sales starts with the original percentage --> my regex match with this string but I don't want to because it contains the word "original"
The 10% of the sales starts with a certain percentage --> my regex match with this string, it's okay because it doesn't containt the word "original"
The 10% of the original
percentage of the sale is higher--> my regex doesn't match with this string, and it's okay because it containts the word "original" (maybe because the new line starts with percentage?)
The 10% of the original sale
is the percentage of that --> my regex match with this string but I don't want to because it contains the word "original"
I'm sorry if my explanation is a little weird, English is not my first language.
Thanks!!!