Skip to content

Commit

Permalink
docs: improve the documentation for extractRegexpValues accumulator
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly committed Aug 3, 2024
1 parent 36d64d6 commit a636c7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ Rule.addAccumulator = function (methodName, methodBuilder) {
};

/**
* This accumulator will store the values extracted by the regexp of the Rule object,
* This accumulator will store the group values extracted by the regexp of the Rule object,
* on the current matching PDF item, into an array.
*
* E.g. with regex: /hello ([a-z]+)/, the text "hello world" will yield "world".
**/
Rule.addAccumulator("extractRegexpValues", function () {
var matches = this.regexp.exec(this.currentItem.text);
Expand Down

0 comments on commit a636c7f

Please sign in to comment.