You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

positions.js 367B

1234567891011121314151617
  1. var types = require('./types');
  2. exports.wordBoundary = function() {
  3. return { type: types.POSITION, value: 'b' };
  4. };
  5. exports.nonWordBoundary = function() {
  6. return { type: types.POSITION, value: 'B' };
  7. };
  8. exports.begin = function() {
  9. return { type: types.POSITION, value: '^' };
  10. };
  11. exports.end = function() {
  12. return { type: types.POSITION, value: '$' };
  13. };