handle long hex colorcodes without #

master
Michael Smith 2012-06-04 11:45:50 -06:00
parent 04abcaf37f
commit 27ff939f33
1 changed files with 2 additions and 2 deletions

View File

@ -21,10 +21,10 @@ my $typestr = join '|', keys %types;
$typestr =~ s/([#\^\$\*\+\?])/\\$1/g;
triggers query_raw => qr/^
(?:(.+)\s+(.+)\s+colou?r(?:\s+code)?| # handles "rgb red color code", "red rgb color code", etc
(?:(.+)\s+(.+)\s+colou?r(?:\s+code)?| # handles "rgb red color code", "red rgb color code", etc
(.+)\s+colou?r(?:\s+code)?(?:\s+for)?\s+(.+)| # handles "rgb color code for red", "red color code for html", etc
($typestr)\s*:?\s*\(?\s*(.+?)\s*\)?| # handles "rgb( red )", "rgb:255,0,0", "rgb(255 0 0)", etc
\#([0-9a-f]{3,6})) # handles #00f, #0000ff, etc
\#?([0-9a-f]{6})|\#([0-9a-f]{3})) # handles #00f, #0000ff, etc
$/ix;
zci is_cached => 1;