0.1.1 • Published 8 years ago

@regexp-extra/block-comment v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

RegExp for matching block comments.

const BLOCK_COMMENT = require('@regexp-extra/block-comment');
// -> regular expression (global, multiline)


BLOCK_COMMENT.test('cake');
// false

BLOCK_COMMENT.test('/*cake*/');
// true

var str = '/**sugar\nfree*/ /* cake*/';
str.match(BLOCK_COMMENT);
// [ '/**sugar\nfree*/', '/* cake*/' ]

new RegExp(BLOCK_COMMENT).exec(str);
// [ '/**sugar\nfree*/',
//   '*sugar\nfree',
//   index: 0,
//   input: '/**sugar\nfree*/ /* cake*/',
//   groups: undefined ]

NPM

credits: taken idea from block-comment-regex.

0.1.1

8 years ago

0.1.0

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago