Skip to content

Named capture failed #296

Closed
Closed
@bluelovers

Description

@bluelovers

node.js v14.4.0

import XRegExp from 'xregexp';

var repeatedWords = XRegExp('\\b(?<word>[a-z]+)\\s+\\k<word>\\b', 'gi');

console.dir(repeatedWords.exec('The the test data'))

console.dir('The the test data'.match(repeatedWords))
[
  'The the',
  'The',
  index: 0,
  input: 'The the test data',
  groups: undefined
]
[ 'The the' ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions