• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

UrlyByrd: wild characters and search question

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello fellow grasshoppers and zen masters,

I have a question regarding the searching data that is allowed to be inputed. The requirements state that that the flex should be "flexible" that being nice and vague makes things about as crystal clear as poo poo. Here is where I'm going with all of this....

Should we account for the meta characters, groupings, etc as part of the searching critieria or is it enough to not allow the user to enter the characters? Or.... do you need to pad the metacharacters appropriatly?

MetaCharacters and the good old back slash of hell:

Character What it represents Example

Any Represents the character typed, with the exception of special characters defined below A represents A, B represents B etc

. Any character(except line breaks) Will match c, 3, [SPACE] etc

\d Any digit Will match 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9

\D Any non-digit Will match anything except 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9

^ Beginning of line

$ End of line

\t [TAB] \thello matches "hello" preceded by a tab

\r Line Break [RETURN]

\s Whitespace Matches any whitespace character: [SPACE], [TAB], Line Break, New Line

\S Non whitespace Matches any non whitespace character

\w Word characters Typically letters, numbers and underscores

\W Non word characters Matches any non word character

\character A character that is normally a special character Special characters are: . # ^ $ \ ? + * | [ ] ( )

[any series of characters] Any characters inside the brackets [abc] matches a, b or c

[any character - another character] Any characters within the range of characters [a-c] matches a, b or c

[^ any series of characters] Any character except ones after the ^ [^c3] matches any character except c or 3

? 0 or 1 of the previous character ba?t matches bat or bt, but not boat

* 0 or more of the previous character ba*t matches bt, bat, baat etc

+ 1 or more of the previous character ba+t matches bat, baat etc but not

Easy question, right?
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think just keep your solution as simple as possible will do the thing as it is stated in my instructions though mine is not Urlybird.
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have also Urlybird to implement.

I search only for letters. So no wild characters and other stuff. If there is '?' then the matching attribute values has to have that character.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes.... do not use magic.... suppose you like music.. and suppose you have money to invest and you want to call your hotel "therapy?" ok..ok... more serious.... flexible mean that you can expand later, add filter for data or add some features from the user, but not do them.... just be flexble but do not implement them... just be as simple as possible
 
Michael Vargenstien
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the input guys. Your right, I think I'm over complicating. When in doubt: K.I.S.S.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic