I have a column File_Content in my DB having lot of text in string format.
keyword is input value to be searched.
I need to search specific words if the exact string matches.
I am using QUERY service with following code in JS:
1) return '{"File_Content":{"$regex":"^"'+keyword+'"$", "$options":"i"}}';
Not Working
2) return '{"File_Content": {"$regex": "^' + keyword + '$", "$options":"i"}}'
Not Working
3) return "{'File_Content':{'$regex':'(?i).^"+ keyword +"$'.'}}";
Not Working
If i remove ^ and $ every query works but not match exact string.
Please provide me solution to match exact string
Thanks in advance