You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the "parseable ackmate format" does not have any documentation on what the format is, I thought I'd do the world a favor and document those here.
A. Lines that look like this :string are filename matches, maps to :filepath
B. Lines that look like this number:string are context lines with no matches, it maps to lineNumber:lineContent
C. Lines that look like this number;number number:string are lines with matches, it maps to lineNumber:matchStartIndex matchLength:lineContent
D. Lines can contain multiple matches, and it looks like number;number number{,number number}+:string, which basically means you'll have multiple matchStartIndex matchLength that are comma separated. Here's regex ^(\d+);((\d+ \d+)(,\d+ \d+)*):(.*)$
E. Lines that look like number;string (not to be confused with B which has a colon, this is a semi-colon) is used when there is a multline line match, this maps to lineNumber;lineContent, the match will found at the first match line (see C) spanning from the first E, the matchStartIndex will be referring to the index in the first matched line. Wild.
F. Lines that look like -- are context group separators, can be ignored.
Worth noting that multiline matches don't work when there's an existing match on the beginning of the match.
This was hastily written feel free to ask for clarification.
Here's an example with a context of 1 matching against string wow
Since the "parseable ackmate format" does not have any documentation on what the format is, I thought I'd do the world a favor and document those here.
A. Lines that look like this
:string
are filename matches, maps to:filepath
B. Lines that look like this
number:string
are context lines with no matches, it maps tolineNumber:lineContent
C. Lines that look like this
number;number number:string
are lines with matches, it maps tolineNumber:matchStartIndex matchLength:lineContent
D. Lines can contain multiple matches, and it looks like
number;number number{,number number}+:string
, which basically means you'll have multiplematchStartIndex matchLength
that are comma separated. Here's regex^(\d+);((\d+ \d+)(,\d+ \d+)*):(.*)$
E. Lines that look like
number;string
(not to be confused with B which has a colon, this is a semi-colon) is used when there is a multline line match, this maps tolineNumber;lineContent
, the match will found at the first match line (see C) spanning from the first E, thematchStartIndex
will be referring to the index in the first matched line. Wild.F. Lines that look like
--
are context group separators, can be ignored.Worth noting that multiline matches don't work when there's an existing match on the beginning of the match.
This was hastily written feel free to ask for clarification.
Here's an example with a context of 1 matching against string
wow
Here's an example with a context of 0 matching against string
hello\nworld
The text was updated successfully, but these errors were encountered: