1.0.1 • Published 10 years ago

rgb-regex v1.0.1

Weekly downloads
7,252,738
License
MIT
Repository
github
Last release
10 years ago

rgb-regex

Build Status

Regex for RGB color strings.

Installation

npm install --save rgb-regex

Usage

var rgbRegex = require('rgb-regex');

rgbRegex({ exact: true }).test('rgb(12, 34, 56)');  // => true
rgbRegex({ exact: true }).test('unicorns');         // -> false
rgbRegex({ exact: true }).test('rgb(,,)');          // => false

rgbRegex().exec('rgb(12, 34, 56)');
// => [
//  '12',
//  '34',
//  '56',
//  index: 0,
//  input: 'rgb(12,34,56)'
// ]

'rgb(12, 34, 56) cats and dogs'.match(rgbRegex());
// = ['rgb(12, 34, 56)']

License

MIT

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with <3 by John Otander (@4lpine).


This package was initially generated with yeoman and the p generator.

is-color-stopvuedragdropuploadimagescloud-archive-s3bb-chat@fundefund/funde_ckgql_din_mod@olivervorasai/slider@infinitebrahmanuniverse/nolb-rg@everything-registry/sub-chunk-2666p149-tablevue-button-test1sticky-scroll-catchtestapavue-compmentvs-tree-plus@ct-note/table@percent/percent-api-hooksgenerator-bootstrap-boilerplate-templatejesusdemois-colorchain_diggerstock-ticker-react-widgettingzi-vuepress@carhoo/widget-dealers@devorso/dcountdown@darwishdev/dash-dev@contagt/metismenuverify-img-codevformlmq@hazyflame/vue-jitsi-meet@graines-digitales/nice-handsome-button@leiyulf/gantt-task-react@itper/css-shorthand-expand@meysam213/react-leaflet@kommunicate/kommunicate-chatbot-plugin@ikon-x/ckeditor5-custom-build-for-irrosoft@img-arena/img-ui-mui-theme@img-arena/ui-core@junvary/quasar-ui-qcascader@sak1sham/react-toc-highlight@refactorpro/pixi-virtual-joystick@oriduk/ckeditor5-rebuild-oriduk@oriduk/ckeditor5-rebuild-musicanote@southcn/ckeditor5-build-inline@stansaal/ckeditor5-custom-buildmggauharp147-tablep148-tablereact-lightbox-pack-18supportreact-gantt-chart7sequelcomponentnka-gantt-task-reactng-search-dropdownpostcss-color-invertpostcss-colorblindresponsis-gantt-task-reacthue-radarhot-zone-vuelitepie-datepicker-gabem2m-chartjs-plugin-crosshairkrown_login_library@vue-helper/vue-keep-alive@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdown@yak-spirit/yak-swap-ui@zebracompany/f_editor@superficial-ui/utils@superficial-ui/components@superficial-ui/coreap-vue-captchaappxgenckeditor-5-imi-1ckeditor5-build-custom-strapickeditor5-custom-build-for-irrosoftckeditor5-strapi-msgckeditor5-custom-ksckeditor5-custom-symmetreckeditor5-custom-build-megampireckeditor5-build-yektackeditor5-click-virtualckeditor5-build-classic-ticketckeditor5-build-classic-v-editcourse-vue-tplconvert-color-jscss-shorthand-expandcssesc-wbgbase-editorflowable-bpmn-modelerget-css-colors
1.0.1

10 years ago

1.0.0

10 years ago