Question about regular expressions

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

In parsing a string that contains HTML, I need to return the text
between each word "characters" and the first "&nbsp" after "characters".

There can be any number of these patterns in the page. I believe I would
use the MatchCollection class. But I'm having difficulty forming the
RegularExpression.

Thanks for any help.
 
how about:
expression = "characters.*&nbsp"

that's a full stop (period) and an asterisk inbetween the search strings -
which basically means "anything inbetween characters and &nbsp".
 
Terry Olsen said:
In parsing a string that contains HTML, I need to return the text
between each word "characters" and the first "&nbsp" after
"characters".

I'm no expert, but I /think/ this should do the trick ...

"characters(.*)&nbsp"

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top