Grab data from string

A

Arjen

Hi,

I have a string with a lot of text. I want to filter out some data. I know
some characters before and after the wanted data.

I know that there is a substring method but this one use a fixed length, a
length I don't know.

How can I retriew the middle data, having a string before and after that
data?

Thanks!
Arjen
 
E

Ebbe Kristensen

Arjen said:
Hi,

I have a string with a lot of text. I want to filter out some data. I
know some characters before and after the wanted data.

I know that there is a substring method but this one use a fixed
length, a length I don't know.

How can I retriew the middle data, having a string before and after
that data?

Using regular expressions (which are directly supported by the .NET
framework) might do the trick. It does depend on the nature of your data,
though.

Ebbe
 

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

Top