Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Engine Help

Status
Not open for further replies.

menwn

Technical User
Oct 27, 2006
3
GR
Hi everyone,

I am building a search engine and I have come across a rather difficult situation. I want to have the ability to search with wildcards but the results have to be as a phrase.

For example If i search for app* mac* I want results containing the the PHRASE 'application mackintosh' or the PHRASE 'apple machines' and not 'application' and 'mackintosh' as words within the text.

Does anyone know the answer?
Thanks in advance for any help.
menwn
 
have a look at regular expressions. in this case you want to interpret the * as any character EXCEPT FOR a space or punctuation character. regex can do this for you.

the php functions are ereg and preg based.

a good site for regex is
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top