Ketan Patil
Posts: 0
Joined: Tue Dec 03, 2013 1:10 pm

how to search string within a string

i want to search string with in a string
for example

if may database contains a entry "nokia apple samsung sony honey"

i want to search for the word "apple"

pl. help

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

how to search string within a string

For searching within the database you can use regular expression. For searching within text (after you get the string from the database), you can use any JavaScript function or library out there.

Ketan Patil
Posts: 0
Joined: Tue Dec 03, 2013 1:10 pm

how to search string within a string

pl. suggest any function

Ketan Patil
Posts: 0
Joined: Tue Dec 03, 2013 1:10 pm

how to search string within a string

or any example, please

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

how to search string within a string

You should be able to find many examples how to parse/search strings on the Internet with JavaScript.

Ketan Patil
Posts: 0
Joined: Tue Dec 03, 2013 1:10 pm

how to search string within a string

i am using return '{"bizname":{"$regex":"^'+value+'", "$options":"i"}}';
i can not understand how to use .match()

Return to “Issues”