Search in multiline string 
Author Message
 Search in multiline string

Hi.
I'm developming ISAPI application.
The mine task is change some peaces of outgoung HTML.
What the best solution for replace operation in case of STL? Or maybe there
is something better for that kind of tasks?
I have some buffer that contain bytes that represent HTML. So it's look like
multiline and maybe there will be null terminators (BTW, is it possible to
have null terminators in bytes prepeared for browser?) in that bytes array.
How can I search something ("hello" word in that buffer, for example) and
replace something (replace "hello" to "olleh")?
The bytes array represented as a pointer to the void.
Thank you!

--

Sincerely, German
"I think there is a world market for maybe five computers." --Thomas Watson,
Chairman of IBM, 1943



Tue, 12 Apr 2005 03:15:26 GMT  
 Search in multiline string
You can probably use the GRETA Regular Expression Template Archive that you
can download from
http://research.microsoft.com/projects/greta/

--
Tom Canham and Arif Sukoco
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> Hi.
> I'm developming ISAPI application.
> The mine task is change some peaces of outgoung HTML.
> What the best solution for replace operation in case of STL? Or maybe
there
> is something better for that kind of tasks?
> I have some buffer that contain bytes that represent HTML. So it's look
like
> multiline and maybe there will be null terminators (BTW, is it possible to
> have null terminators in bytes prepeared for browser?) in that bytes
array.
> How can I search something ("hello" word in that buffer, for example) and
> replace something (replace "hello" to "olleh")?
> The bytes array represented as a pointer to the void.
> Thank you!

> --

> Sincerely, German
> "I think there is a world market for maybe five computers." --Thomas
Watson,
> Chairman of IBM, 1943



Mon, 18 Apr 2005 03:15:48 GMT  
 Search in multiline string
BTW

How limiting is the MSR EULA really? My internal license agreement
interpreter/compiler
usually bombs out with an internal error after the first few lines ...

"
You may do anything you want with the Software source code for
non-commercial research or non-commercial teaching purposes free of charge
"



Quote:
> You can probably use the GRETA Regular Expression Template Archive that
you
> can download from
> http://research.microsoft.com/projects/greta/

> --
> Tom Canham and Arif Sukoco
> Visual C++ Team
> This posting is provided "AS IS" with no warranties, and confers no
rights.


> > Hi.
> > I'm developming ISAPI application.
> > The mine task is change some peaces of outgoung HTML.
> > What the best solution for replace operation in case of STL? Or maybe
> there
> > is something better for that kind of tasks?
> > I have some buffer that contain bytes that represent HTML. So it's look
> like
> > multiline and maybe there will be null terminators (BTW, is it possible
to
> > have null terminators in bytes prepeared for browser?) in that bytes
> array.
> > How can I search something ("hello" word in that buffer, for example)
and
> > replace something (replace "hello" to "olleh")?
> > The bytes array represented as a pointer to the void.
> > Thank you!

> > --

> > Sincerely, German
> > "I think there is a world market for maybe five computers." --Thomas
> Watson,
> > Chairman of IBM, 1943



Mon, 18 Apr 2005 16:26:19 GMT  
 Search in multiline string
Try a regular expressions management library, it will give you great
flexibility.

You can try a commercial (but inexpensive) one from
http://www.utilitycode.com/str or the freely available Regex++, which will
take some more tweaking but may be more appropriate if you don't have an
extra $49 in the budget.


Quote:
> Hi.
> I'm developming ISAPI application.
> The mine task is change some peaces of outgoung HTML.
> What the best solution for replace operation in case of STL? Or maybe
there
> is something better for that kind of tasks?
> I have some buffer that contain bytes that represent HTML. So it's look
like
> multiline and maybe there will be null terminators (BTW, is it possible to
> have null terminators in bytes prepeared for browser?) in that bytes
array.
> How can I search something ("hello" word in that buffer, for example) and
> replace something (replace "hello" to "olleh")?
> The bytes array represented as a pointer to the void.
> Thank you!

> --

> Sincerely, German
> "I think there is a world market for maybe five computers." --Thomas
Watson,
> Chairman of IBM, 1943



Mon, 18 Apr 2005 21:35:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Searching *EVERY* string in a string

2. Searching a string in a string

3. How Can I Search a String in String with C

4. Multiline string constant

5. Extracting lines of text out of a multiline string

6. Multiline C-String

7. Searching sub strings - Performance.

8. Searching strings...

9. Searching for strings

10. Searching a string...Thanks for the help!

11. Searching a string a character at a time

12. Newbie: Sub-String search and replace routine

 

 
Powered by phpBB® Forum Software