Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Regular Expression search time

User Image
Paul Scannell
20 discussion posts
Does anyone know how to speed up the regular expression search? If I do a simple text search irt is very fast. But as soon as I do a regular expression search it slows to a totally unacceptable level for what I'm trying to do.

Thanks in advance,
Paul
Jan 12, 2016  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Would you be able to share the RegEx expression that you're using for the search? I'd like to test it out here to see if we can reproduce the same results.

Thanks!
Jan 13, 2016  • #2
User Image
Paul Scannell
20 discussion posts
If I perform this query, ".*cmd:.*text" it takes forever to do the file search. By forever, I mean nothing changes on the screen.

Conversely, doing a standard query of: "cmd: + text" goes very fast, but the end results some times isn't what I want because "cmd:" might appear on one line of the file and "text" appears on another line. I want to know when both pieces of text appear on the same line with the "cmd:" occurring first. The Regex expression would produce those results, but it takes way too long to process.

Paul
Jan 13, 2016  • #3
User Image
Paul Scannell
20 discussion posts
As a follow-up to this, assuming that the Regex search cannot be sped up, is there a way to perform an "OR" type of query? If I could do that, then I could provide the possible things that could be between the "cmd:" and the "text", like:
"cmd://Main/OpenDialog" or "cmd://Form/OpenDialog" or "cmd://View/OpenDialog"

Thanks,
Paul
Jan 13, 2016  • #4
Keith Lammers (BFS)'s profile on WallpaperFusion.com
There sure is a way to do an OR! Just separate each search term by a space, like so:

"cmd://Main/OpenDialog" "cmd://Form/OpenDialog" "cmd://View/OpenDialog"

We'll check into that RegEx query too, to see if there's anything we can do to improve the speed.

Thanks!
Jan 13, 2016  • #5
User Image
Paul Scannell
20 discussion posts
How would I do that if I was using a command line version? Here is the snippet of the batch file I use. The compare string is passed into the batch file as a parameter:

-q "cmd: + %1" -o c:\xxx\yyy\zzz\Lookup,csv -start

Are you saying that this would work:

-q "cmd://Main/%1" "cmd://Form/%1" "cmd://View/%1" -o c:\xxx\yyy\zzz\Lookup,csv -start

Thanks,
Paul
Jan 13, 2016  • #6
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Close, you need to quote the whole query and then escape the quotes inside, like this:

Code

-q "\"cmd://Main/%1\" \"cmd://Form/%1\" \"cmd://View/%1\"" -o c:\xxx\yyy\zzz\Lookup,csv -start


Alternatively, I talked to one of our devs, and he recommended a RegEx statement that should work a lot faster than the one you were using. You would run it like this:

Code

-r "cmd:.*?OpenDialog"  -o c:\xxx\yyy\zzz\Lookup,csv -start


Hope that helps!
Jan 14, 2016  • #7
User Image
Paul Scannell
20 discussion posts
Doing the Regex the way you suggested works fine. It goes through all of the files quickly which is the goal.

Thanks,
Paul
Jan 14, 2016  • #8
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Awesome, glad to hear it!
Jan 14, 2016  • #9
Was this helpful?  Login to Vote(-)  Login to Vote(-)