Created
April 23, 2010 02:20
-
-
Save jasonm23/376082 to your computer and use it in GitHub Desktop.
grep =#HEXRGB, =\#HEXRGB or =0,0,0..=255,255,255 (rgb values)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grep =#HEXRGB, =\#HEXRGB or =0,0,0..=255,255,255 (rgb values) from a simple 'key=value' file. | |
# e.g. Java # properties. (Eclipse .prefs, windows .ini) | |
cat file.prefs | grep -E -i -e '=\#([0-9|A-F]){6}|=\\\#[0-9|A-F]|=([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(,([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){2}[^ ,0-9]'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The hexrgb matching could be better.