Jump to content
Storyist Forums
Steve E

Booleans and Variables in Find/Change function.

Recommended Posts

At some point I'd like to see search variables (*?#) and a full set of Boolean functions in the Find/Change function.

 

Thank you.

-Thoth.

Share this post


Link to post
Share on other sites
At some point I'd like to see search variables (*?#) and a full set of Boolean functions in the Find/Change function.

 

By search variables, do you mean wildcards?

 

IF

Share this post


Link to post
Share on other sites
By search variables, do you mean wildcards?

 

IF

By "search variables" I mean symbols that can stand in for any element of a pre-defined domain (i.e., a variable), which, in this case we will use for searching. But yes, Isaac, I do believe some folk call them "wildcards". (Yep. I'm sure I heard that somewhere.) Wildcards with ranges and a multiplier would be ideal. Eg. 3(a-c,t) yields CAT, CAB and so forth. C+T yielding CAT or COT but not COAT. CA*T yielding CAT or CARROT. 1+9(#) yields a one followed by exactly nine digits. I'd also like variables for punctuation. But I think you know where I'm coming from.

 

-√Thoth

Share this post


Link to post
Share on other sites
By "search variables" I mean symbols that can stand in for any element of a pre-defined domain (i.e., a variable), which, in this case we will use for searching. But yes, Isaac, I do believe some folk call them "wildcards". (Yep. I'm sure I heard that somewhere.) Wildcards with ranges and a multiplier would be ideal. Eg. 3(a-c,t) yields CAT, CAB and so forth. C+T yielding CAT or COT but not COAT. CA*T yielding CAT or CARROT. 1+9(#) yields a one followed by exactly nine digits. I'd also like variables for punctuation. But I think you know where I'm coming from.

 

The name wildcard is the correct technical term and comes from card games. Think, "Jokers wild." It is the any card. Variable has a different meaning in the context of searching for developers. The most common wildcard symbols are "*", which represents any number of characters, and "?", which represents a single character.

 

For what you describe for ranged searches, "3(a-c,t)", is usually accomplished with regular expressions (regex), which I think Steve and I talked about adding over a year ago, but I don't think it made it in. In Posix regex, your search there would look something like this:

 

[a-c,t]{3,3}.

 

Ugly, huh? The stuff in brackets is obviously your character range, and the numbers in braces represent the "minimum,maximum" number of characters to match.

 

Finally, variables appear in regular expressions (which is probably why your original request confused me a bit), and can be quite useful for pattern matches. You can specify something like:

 

(the|a|an|these) \1

 

This searches for double instances of any of the words in parenthesis. The "\1" is a variable that expands to what ever word was matched in the parenthesis.

 

Regular expressions are one of the more evil realms of software development (and one of my favorite), and definitely not for everyone. The wildcard request doesn't sound too bad, though. Of course, it's up to Steve.

 

IF

Share this post


Link to post
Share on other sites
The name wildcard is...blah blah blah...

Potaytoes, potahtoes. As I've mentioned elsewhere, I'm not a developer. My definition of variable stands inviolable.

 

The wildcard request doesn't sound too bad, though.

Thank you. Your approval means everything to me.

 

Of course, it's up to Steve.

Obviously.

 

-Thoth.

Share this post


Link to post
Share on other sites
Potaytoes, potahtoes. As I've mentioned elsewhere, I'm not a developer. My definition of variable stands inviolable.

 

Should I mention that wildcard is the correct term for both Windows and OS X (and Linux and BSD and Solaris, etc.) for matching file names and resources?

 

Nyah, nyah.

 

IF

Share this post


Link to post
Share on other sites
Should I mention that wildcard is the correct term for both Windows and OS X (and Linux and BSD and Solaris, etc.) for matching file names and resources?

Nyah, nyah.

No. You shouldn't. Even assuming all five have more in common than just *. We're not talking OS file name searches, we're talking WP file content searches. A different and more complex issue.

 

Nyah, nyah, back atcha.

 

Inviolable dammit,

-Thoth.

 

BTW: I'm glad we're not paying for the forum's disk space.

BTWjr: I looked over your Search Enhancements thread from 5/5/07. You might want to look at it again yourself.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...