Please use ( and ) to capture text:
Code: Select all
D:\HOME\org\notes\ ext:txt regex:content:(.*pandoc.*) addcolumn:regmatch1
The
line containing pandoc is shown under the regmatch1 column.
The first ( ) group will capture the match into regmatch1.
The second ( ) group will capture the match into regmatch2.
and so on..
regmatch0 shows the whole match. (not the whole contents of the file, it will just be pandoc)
However, in this case, nothing is shown for Regular expression match 0 because of an optimization.
To use Regular expression match 0, prefix your regex search with nofastregex:
Code: Select all
D:\HOME\org\notes\ ext:txt nofastregex:regex:content:"pandoc" addcolumn:regmatch0
Please note, regmatch0 shows only the matched text.
In this case it will just be pandoc.
I will disable regex optimization when the Regular expression match 0 column is shown in the next alpha update.