First txt
Code: Select all
cat
dog
house
desertCode: Select all
cat
dog
house
sunny
boys
farmThanks in advance
Note: the above example is just for explaining the idea not what I deal with
Code: Select all
cat
dog
house
desertCode: Select all
cat
dog
house
sunny
boys
farmCode: Select all
farm[\s\S]*?house|house[\s\S]*?farmThank you very much, It works greathighend wrote:Code: Select all
farm[\s\S]*?house|house[\s\S]*?farm
Just curious but why the character class for white-space or not white-space instead of just matching anything?highend wrote:Code: Select all
farm[\s\S]*?house|house[\s\S]*?farm
Ah! That makes sense... I didn't realize XY's dot didn't include line breaks.Marco wrote:That's to match terms not on the same line. The dot matches everything except \r\n, while [\s\S] matches newlines too.
Thank you MILLION TIMEShighend wrote:The best solution would be e.g.: http://www.mythicsoft.com/agentransack
1. It's free
2. It allows you to use boolean AND OR
3. It accepts command line parameters so you can easily invoke it from XY with what's needed
One disadvantage: It seems it's not able to use boolean regex expressions (the commercial version does) so it finds e.g.
household and farmboy as well.
But there are so many alternatives that could be used (grep | gawk), I'm sure you'll find something...
Code: Select all
run '"C:\Program Files\Mythicsoft\FileLocator Pro\FileLocatorPro.exe"-d "(Desired Look in Path)"';Code: Select all
run """C:\Program Files\Mythicsoft\FileLocator Pro\FileLocatorPro.exe"" -d ""<curpath>""";Thank you very much, it works nowTheQwerty wrote:Single-quote strings are treated as literals meaning no variables are resolved, so you'll need to use double quotes instead.
Not knowing FLP but I'd assume this should work:For more information:Code: Select all
run """C:\Program Files\Mythicsoft\FileLocator Pro\FileLocatorPro.exe"" -d ""<curpath>""";
Don's quick set of rules to understanding quoting.
And my own much more detailed explanation.