Help me with regex!

  • Thread starter Thread starter alexvorn2
  • Start date Start date
A

alexvorn2

How to get the text with regex code that will find the text that is
between < and >
only if it's length is more 10 characters {10,} ?
please help me!

Example text contains:

<
some text here
<some text here too>

<the
quick brown fox
is running in the
yard, and this too

<this not
 
Hope this helps a bit

//

foreach (DictionaryEntry de in reader)

{

int i = de.Value.ToString().Length;

if(i > 10)

{

MessageBox.Show(i.ToString());

MessageBox.Show(de.Value.ToString());

}
 
try
<[a-zA-Z0-9 ]{10,}>


--
Misbah Arefin



alexvorn2 said:
How to get the text with regex code that will find the text that is
between < and >
only if it's length is more 10 characters {10,} ?
please help me!

Example text contains:

<
some text here

<some text here too>

<the
quick brown fox
is running in the
yard, and this too


<this not
 
alexvorn2 said:
How to get the text with regex code that will find the text that is
between < and >
only if it's length is more 10 characters {10,} ?

Untested:

"<[^>]{10,}>"

Arne
 
The difference between <[a-zA-Z0-9 ]{10,}> and <[^>]{10,}> of course
is how this, "<here is an example perhaps of <unexpected behaviour>"
is treated.

Kofi Sarfo

alexvorn2 said:
How to get the text with regex code that will find the text that is
between < and >
only if it's length is more 10 characters {10,} ?

Untested:

"<[^>]{10,}>"

Arne
 
Back
Top