Using Version 1.5.0.1337a (x64) Portable
Using the search string below to search in folder H:\Psim for files with text content "PUT ", I got a whole list of files...good so far.
"H:\Psim\" content:"PUT "
But I realised that it was picking up files with the string ..."put "... including "input ". I was after files that had lines begining with "PUT "
So first I tried regex:content:"PUT " and that returned the same files as the search above.
So I next tried regex:content:"^PUT " and this returned NO files (there are files that have lines begining with "PUT ")
I saw an earlier post from Void indicating this should have worked. Where have I gone wrong?
Regex Content searching
Re: Regex Content searching
Please try with the multi-line: search modifier:
multiline:regex:content:"^PUT "
-or-
regex:content:"(?m)^PUT "
Otherwise, regex will treat ^ as the start of the whole content instead of the start of the line.
multiline:regex:content:"^PUT "
-or-
regex:content:"(?m)^PUT "
Otherwise, regex will treat ^ as the start of the whole content instead of the start of the line.
Re: Regex Content searching
Without the regex-requirement, this should work too:
each-line:
startwith:
Code: Select all
each-line:startwith:content:"PUT "
startwith:
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: Regex Content searching
i try to use this line:
G:\my-folder\ regex:content:"*my-search*[*"
...in order to find the cue-files that contain the following (in some line):
- some symbols (or nothing)
- my-search
- some symbols (or nothing)
- [
- some symbols (or nothing)
in main menu of ET: reg-ex is not enabled (as always)
my cue/txt-files are indexed by ET
how should i correct the line? (so that it began working)
G:\my-folder\ regex:content:"*my-search*[*"
...in order to find the cue-files that contain the following (in some line):
- some symbols (or nothing)
- my-search
- some symbols (or nothing)
- [
- some symbols (or nothing)
in main menu of ET: reg-ex is not enabled (as always)
my cue/txt-files are indexed by ET
how should i correct the line? (so that it began working)
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: Regex Content searching
the next variants do not work too:
"G:\my-folder\" regex:content:"*my-search*[*"
"G:\my-folder\" multiline:regex:content:"*my-search*[*"
"G:\my-folder\" regex:content:"my-search*["
the next (partial) variant works:
G:\my-folder\ regex:content:"my-search*"
but it's obviously that it only finds the my-search part (10 lines appear in result-list),
if i remove the regex: symbols, and enable the reg-ex (in main menu), then ET loses those 10 lines,
if i add the [ part, then the result-list is still empty
"G:\my-folder\" regex:content:"*my-search*[*"
"G:\my-folder\" multiline:regex:content:"*my-search*[*"
"G:\my-folder\" regex:content:"my-search*["
the next (partial) variant works:
G:\my-folder\ regex:content:"my-search*"
but it's obviously that it only finds the my-search part (10 lines appear in result-list),
if i remove the regex: symbols, and enable the reg-ex (in main menu), then ET loses those 10 lines,
if i add the [ part, then the result-list is still empty
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: Regex Content searching
there's no good result at the moment. i tried:You have to escape [ with \:
G:\my-folder\ regex:content:"*my-search*\[*"
"G:\my-folder\" regex:content:"*my-search*\[*"
G:\my-folder\ regex:content:"my-search*\["
"G:\my-folder\" regex:content:"my-search*\["
G:\my-folder\ content:"*my-search*\[*" (with enabled reg-ex in main menu)
"G:\my-folder\" content:"*my-search*\[*" (with enabled reg-ex in main menu)
"G:\my-folder\" regex:content:"*my-search*\\[*"
- to toggle the 'allow literal operators' (in options)
- to toggle the 'replace forward slashes with back-slashes' (in options)
Re: Regex Content searching
Also replace * with .*
Code: Select all
regex:content:".*my-search.*\[.*"
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: Regex Content searching
thanks, it finally works:Also replace * with .*
Code: Select all
G:\PO\A\Ace Of Base regex:content:"Don't Go Away.*\["
but it refuses to do the same if i remove the regex: part,
and enable the reg-ex in main menu
but the regex: part is seemingly less convenient (than ticking the main menu item)
added several minutes later:
the issue related to the 'reg-ex' main menu item
forced me to create a nice work-around/bookmark:
Code: Select all
G:\PO\A\× regex:content:"×.*\["
- nowhere (in my cue/txt-files) i have the × symbol,
so it's just a great object to be substituted for some other symbols