Regular expressions in search

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
TylerDurden
Posts: 2
Joined: 2005-01-11 18:17

Regular expressions in search

Post by TylerDurden » 2005-01-11 18:32

I realize not everyone understands this. I also don't know how hard it is to implement yadda yadda yadda. I think I saw someplace that fulDC or something had this support. However, I really love my vanilla DC++.

Any chance?

P.S. bugzilla pissed me off so I came here.
P.S.² GargoyleMT, I see you live in PA? Awesome, go PA!

Xan1977
Forum Moderator
Posts: 627
Joined: 2003-06-05 20:15

Post by Xan1977 » 2005-01-11 20:24

RegExp searching would be neat. It is proposed in the mockup for ADC (DC extended protocol)
5.1 REGEX

Regular expressions in searches. Extends the SCH command with the operator RE that takes a regular expression in the (Perl? PCRE? Java? .NET? POSIX?) form.

http://dcplusplus.sourceforge.net/ADC.html

We have NOT already, but it's done by filtering incoming search results, rather than on the sending clients side; where it should be done.

TylerDurden
Posts: 2
Joined: 2005-01-11 18:17

Post by TylerDurden » 2005-01-11 20:55

I suppose what I really want is it to be incorporated in the client send routine so that the results have actual useful results and not simply filtered results that may or may not be useful at all after the filter, even though the user may have other files that do satify the filter. I assume this would require both the sender and receiver to have an updated client. Thanks for the reply.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-12 12:32

TylerDurden wrote:I suppose what I really want is it to be incorporated in the client send routine

Xan was saying that "NOT" is implemented locally, using "-". Don't generalize what he said to mean that ADC RegExps will/would be the same.

RegExp searches have a couple issues:
- changing the behavior of $Search on nmdc hubs (if implemented for the NMDC core)
- lack of a good (and small/license friendly) library
- CPU utilization - for people with large shares, the existing substring matching is a problem. We've alleviated this somewhat by doing alternate searches by TTH, which is a hash table lookup.
- CPU utilization redux, http://mail.python.org/pipermail/python-list/2001-January/023428.html

I assume this would require both the sender and receiver to have an updated client.

Using the NMDC protocol, there's no way to check the capabilities of a remote client, all you get is the $Search. Presumably, you could use another of the file types (as done with hash searches), but that feels like a hack.

P.S.² GargoyleMT, I see you live in PA? Awesome, go PA!

Yeah, eastern/central. And Xan is a Jersey boy... Americans are rather the exception on the board, though. :)

Locked