473,327 Members | 2,055 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,327 software developers and data experts.

Help me with regex!

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
>
Feb 1 '08 #1
5 1109
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());

}

"alexvorn2" <al*******@gmail.comwrote in message
news:7a**********************************@u10g2000 prn.googlegroups.com...
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
>>

Feb 1 '08 #2
try
<[a-zA-Z0-9 ]{10,}>
--
Misbah Arefin

"alexvorn2" wrote:
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

Feb 1 '08 #3
Hi,

Where is your Regex here?

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"MikeY" <mi*******@yahoo.comwrote in message
news:eo****************@TK2MSFTNGP04.phx.gbl...
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());

}

"alexvorn2" <al*******@gmail.comwrote in message
news:7a**********************************@u10g2000 prn.googlegroups.com...
>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
>>>


Feb 1 '08 #4
alexvorn2 wrote:
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
Feb 2 '08 #5
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

On 2 Feb, 00:42, Arne Vajhøj <a...@vajhoej.dkwrote:
alexvorn2 wrote:
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
Feb 2 '08 #6

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

Similar topics

6
by: Tony C | last post by:
I'm writing a python program which uses regular expressions, but I'm totally new to regexps. I've got Kuchling's "Regexp HOWTO", "Mastering Regular Expresions" by Oreilly, and have access to...
6
by: iam247 | last post by:
Hi I am a relative beginner with ASP and weak on syntax for sql statements. Basically I modify something which works. I have tblGroupContact with two fields both long integer - ContactID &...
8
by: Bibe | last post by:
I've been trying to get this going for awhile now, and need help. I've done a regex object, and when I use IsMatch, it's behavior is quite weird. I am trying to use Regex to make sure that a...
6
by: Dave | last post by:
I'm struggling with something that should be fairly simple. I just don't know the regext syntax very well, unfortunately. I'd like to parse words out of what is basically a boolean search...
4
by: henrik | last post by:
Hi I have a regex question. I want to find all content of a <td class="someclass"> tag. This means the expression should include all other tags included between <td class="someclass"> and </td>....
9
by: jmchadha | last post by:
I have got the following html: "something in html ... etc.. city1... etc... <a class="font1" href="city1.html" onclick="etc."click for <b>info</bon city1 </a> ... some html. city1.. can repeat...
2
by: Alex Maghen | last post by:
This is a bit of an abuse of this group. Just a nit, but I'm hoping someone really good with Regular Expressions can help me out here. I need to write a regular expression that will do the...
3
by: =?Utf-8?B?TmF2ZWVu?= | last post by:
Not sure if this is the right forum for this question but couldn'd find another newsgroup. I am new to Regular expressions and would like help in deciding which pattern allows me to split a...
10
by: supercrossking | last post by:
I am trying to the values of string of text in the sample before. The ds are for digits and s is for string and string of text is for a string with more than one or two values. I am trying to use...
0
by: Support Desk | last post by:
That’s it exactly..thx -----Original Message----- From: Reedick, Andrew Sent: Tuesday, June 03, 2008 9:26 AM To: Support Desk Subject: RE: regex help The regex will now skip anything with...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.