aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.js
blob: e89dc8545153fc27b626dae54e7756db448cf53f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Storage for regular expressions
SVG.regex = {
  
  unit:   /^([\d\.]+)([a-z%]{0,2})$/
  
, hex:    /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i

, rgb:    /rgb\((\d+),(\d+),(\d+),([\d\.]+)\)/

, hsb:    /hsb\((\d+),(\d+),(\d+),([\d\.]+)\)/

, isHex:  /^#/i

, isRgb:  /^rgb\(/
  
, isHsb:  /^hsb\(/
  
}