0.1.1 • Published 7 years ago

@regexp-extra/block-comment v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 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

7 years ago

0.1.0

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago