I'm dealing with a huge amount of CSS across several files and trying to debug issues with layout looking for bugs like width:105%
I only have access to notepad++ on a Windows machine that supports Regular Expression in Search.
I'm dealing with a huge amount of CSS across several files and trying to debug issues with layout looking for bugs like width:105%
I only have access to notepad++ on a Windows machine that supports Regular Expression in Search.
([1-9]0[1-9]|[1-9]{2}\d|[2-9]\d{2}|\d{4,})\s*%
Should do the trick for all numbers in the range of 101 and upward.
101%
110%
210%
999 %
1000000000%
Will all match.
Assuming they are all non-negative integer percentages and not zero-prefixed, you could negate anything with 0% to 100%
- but only run that over lines with a % in them.
e.g. on the command line
fgrep % something.css | egrep -v ":\s*[0-9]{1,2}%" | fgrep -v 100%
The regular expression will match 0-99%, so I just remove 100% on it's own.
1(?:0[1-9]|[1-9]\d)%
Would be my guess. That matches 10*
(where * > 0
) or 1**
where * > 10
EDIT
For a better method to handle > 100 numbers (and not limit at 999):
(?:\d{4,}|[1-9]0[1-9]|[1-9][1-9]\d|[2-9]\d{2})
I suppose regex for finding values bigger than 100% percent would be :
width\s?:\s?[0-9]*[1-9]{1}[0-9]{1}[0-9]{1}%
This should find everything even 190999%