1.0.1 • Published 9 years ago

rgb-regex v1.0.1

Weekly downloads
7,252,738
License
MIT
Repository
github
Last release
9 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-test1vue-compment@graines-digitales/nice-handsome-buttonresponsis-gantt-task-reacttingzi-vuepresssequelcomponenttestapasticky-scroll-catchstock-ticker-react-widgetvformlmqverify-img-code@junvary/quasar-ui-qcascader@kommunicate/kommunicate-chatbot-plugin@leiyulf/gantt-task-react@meysam213/react-leafletflowable-bpmn-modelergenerator-bootstrap-boilerplate-templateget-css-colors@img-arena/img-ui-mui-theme@img-arena/ui-core@refactorpro/pixi-virtual-joystick@sak1sham/react-toc-highlightis-color@hazyflame/vue-jitsi-meet@ikon-x/ckeditor5-custom-build-for-irrosoft@itper/css-shorthand-expandhot-zone-vue@percent/percent-api-hooks@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oridukhue-radar@southcn/ckeditor5-build-inlinejesusdemo@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdown@stansaal/ckeditor5-custom-buildng-search-dropdownappxgen@zebracompany/f_editor@contagt/metismenu@darwishdev/dash-devnka-gantt-task-reactbase-editorchain_digger@ct-note/tablem2m-chartjs-plugin-crosshairlitepie-datepicker-gabe@yak-spirit/yak-swap-ui@superficial-ui/components@superficial-ui/core@superficial-ui/utils@vue-helper/vue-keep-alivemggauharap-vue-captcha@carhoo/widget-dealersconvert-color-js@devorso/dcountdownpostcss-color-invertpostcss-colorblindckeditor5-build-classic-ticketckeditor5-build-classic-v-editckeditor5-build-custom-strapickeditor-5-imi-1ckeditor5-custom-build-megampireckeditor5-click-virtualckeditor5-custom-symmetreckeditor5-custom-build-for-irrosoftckeditor5-custom-ksckeditor5-build-yektackeditor5-strapi-msgp147-tablep148-tablecss-shorthand-expandcssesc-wbgcourse-vue-tplreact-lightbox-pack-18support
1.0.1

9 years ago

1.0.0

9 years ago