index.js 262 B

123456789
  1. 'use strict';
  2. module.exports = function rgbaRegex(options) {
  3. options = options || {};
  4. return options.exact ?
  5. /^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/ :
  6. /rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)/ig;
  7. }