473,320 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to return a string with 5 previous words and 5 after words

hello friends !

i have a database full of articles. I want to search that database with
keywords.
i expect this database to send me back a list of articles containing the
search string(s).
i would like to display the result like google does: the searchstring
highlighted within its context sentence (about 20 characters before, and 20
characters after the searchstring).

I'm wondering how to return the contextual sentence.

any idea?
--
*-]

Alexandre
Jul 17 '05 #1
0 1736

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bruce W.1 | last post by:
The intent of my web service is an RSS feed from a blog. Originally I used a StringBuilder to make the XML and returned a string from the webmethod. But this doesn't display properly in IE. So...
23
by: Nascimento | last post by:
Hello, How to I do to return a string as a result of a function. I wrote the following function: char prt_tralha(int num) { int i; char tralha;
15
by: AussieRules | last post by:
Hi, I have a need to do two selects against to stored proc's in my SQL db. At the moment, each SP is called and two different dataset are populate. Thats two round trips to the SQL server. ...
8
by: Dave | last post by:
Greetings, Is there a way I can split a string into an array on a space OR a carriage return? What would the code look like for this? Thanks, -Dave
9
by: Steven | last post by:
Hello, I have a question about strcmp(). I have four words, who need to be compared if it were two strings. I tried adding the comparison values like '(strcmp(w1, w2) + strcmp(w3, w4))', where...
7
by: Matt | last post by:
I am attempting to reformat a string, inserting newlines before certain phrases. For example, in formatting SQL, I want to start a new line at each JOIN condition. Noting that strings are...
42
by: =?Utf-8?B?UGxheWE=?= | last post by:
I have an if statement that isn't working correctly and I was wondering how I check for a blank string. My Code Example if me.fieldname(arrayIndex) = "" then ----- end if When I do this and...
4
by: Robba | last post by:
I got a little problem, i have to return the number of the array of the word that is filled in. First there is filled in a sentence, and have to be split. I think i splitted it but now i cant...
11
by: Lo'oris | last post by:
I'd like to have a set of "allowed characters", and strip a string from everything besides those. I've tried and tried but so far every time I enter strings containing unicode, it goes mad and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.