Skip to content

Commit

Permalink
use non-capturing group in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikJan committed Nov 20, 2023
1 parent 4e37147 commit ac55a87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/locales/nl/parsers/NLRelativeDateFormatParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/
import { matchAnyPattern } from "../../../utils/pattern";

const PATTERN = new RegExp(
`(dit|deze|(aan)?komend|volgend|afgelopen|vorig)e?\\s*(${matchAnyPattern(TIME_UNIT_DICTIONARY)})(?=\\s*)` +
`(dit|deze|(?:aan)?komend|volgend|afgelopen|vorig)e?\\s*(${matchAnyPattern(TIME_UNIT_DICTIONARY)})(?=\\s*)` +
"(?=\\W|$)",
"i"
);

const MODIFIER_WORD_GROUP = 1;
const RELATIVE_WORD_GROUP = 3;
const RELATIVE_WORD_GROUP = 2;

export default class NLRelativeDateFormatParser extends AbstractParserWithWordBoundaryChecking {
innerPattern(): RegExp {
Expand Down

0 comments on commit ac55a87

Please sign in to comment.