Quantcast
Channel: voidtools forum
Viewing all articles
Browse latest Browse all 2710

Everything 1.5 Alpha • Re: Unable to show regular expression match

$
0
0
Please use ( and ) to capture text:

Code:

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:

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.

Statistics: Posted by void — Wed Jul 30, 2025 7:43 am



Viewing all articles
Browse latest Browse all 2710

Latest Images

Trending Articles



Latest Images