Skip to main content
Inspiring
April 12, 2007
Question

Comparison Operators - Wildcard?

  • April 12, 2007
  • 1 reply
  • 180 views
Hey Folks,
I am working on some search functionality, and want to be able to create a statement that will compare a string to see if it is included in a larger one. For instance, the user could search for "Bread" and I would want the results to include ["Bread Pudding","Wheat Bread","Cornbread"]. Something like that is proving tough for me,but I bet there is a magic piece of knowledge that I am not finding. Anyone got it?
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 12, 2007
you can use the indexOf() method of strings with a.s. 2. or use a.s. 3 which supports regular expressions.