473,322 Members | 1,421 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,322 software developers and data experts.

Regular Expresions

Hi to all,

i did this regular expresion <!--!.*!--> that matchs all occurrences of type

<!--!Name!-->
<!--!Description!-->

and so on...

I would like to know the regular expression to get (for instance) for this
example, only the matches Name and Description without the start <!--! and
the end !-->

--
Thanks
Regards.
Josema
Mar 10 '06 #1
5 1820
Name
Description

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

"Josema" <Je******@ocu.org> wrote in message
news:60**********************************@microsof t.com...
Hi to all,

i did this regular expresion <!--!.*!--> that matchs all occurrences of
type

<!--!Name!-->
<!--!Description!-->

and so on...

I would like to know the regular expression to get (for instance) for this
example, only the matches Name and Description without the start <!--! and
the end !-->

--
Thanks
Regards.
Josema

Mar 10 '06 #2
Hi, Kevin....

i would need a regular expresion like <!--!.*!--> cause i dont know what
kind of data come... could be <!--!Name!--> <!--!Description!--> or
<!--!xxxxx!-->

Do you know how could be the regular expresion?
--
Thanks
Regards.
Josema
"Kevin Spencer" wrote:
Name
Description

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

"Josema" <Je******@ocu.org> wrote in message
news:60**********************************@microsof t.com...
Hi to all,

i did this regular expresion <!--!.*!--> that matchs all occurrences of
type

<!--!Name!-->
<!--!Description!-->

and so on...

I would like to know the regular expression to get (for instance) for this
example, only the matches Name and Description without the start <!--! and
the end !-->

--
Thanks
Regards.
Josema


Mar 10 '06 #3
> Hi to all,

i did this regular expresion <!--!.*!--> that matchs all occurrences
of type

<!--!Name!-->
<!--!Description!-->
and so on...

I would like to know the regular expression to get (for instance) for
this example, only the matches Name and Description without the start
<!--! and the end !-->


@"<!--!(?<text>.*?)!-->"

This will give you a named group.

usage:

Regex re = new Regex(@"...");
Match ma = re.Match(s);
if (ma.Success)
{
String text = ma.Groups["text"].Value;
....
}

--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
Mar 10 '06 #4
Thanks a lot Karlsen, whas exactly the stuff that im searching for
--
Thanks
Regards.
Josema
"Lasse Vågsæther Karlsen" wrote:
Hi to all,

i did this regular expresion <!--!.*!--> that matchs all occurrences
of type

<!--!Name!-->
<!--!Description!-->
and so on...

I would like to know the regular expression to get (for instance) for
this example, only the matches Name and Description without the start
<!--! and the end !-->


@"<!--!(?<text>.*?)!-->"

This will give you a named group.

usage:

Regex re = new Regex(@"...");
Match ma = re.Match(s);
if (ma.Success)
{
String text = ma.Groups["text"].Value;
....
}

--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2

Mar 10 '06 #5
Sorry, Josema, I misunderstood your question. However, I can see that it has
been answered. Good luck!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

"Josema" <Je******@ocu.org> wrote in message
news:FD**********************************@microsof t.com...
Hi, Kevin....

i would need a regular expresion like <!--!.*!--> cause i dont know what
kind of data come... could be <!--!Name!--> <!--!Description!--> or
<!--!xxxxx!-->

Do you know how could be the regular expresion?
--
Thanks
Regards.
Josema
"Kevin Spencer" wrote:
Name
Description

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

"Josema" <Je******@ocu.org> wrote in message
news:60**********************************@microsof t.com...
> Hi to all,
>
> i did this regular expresion <!--!.*!--> that matchs all occurrences of
> type
>
> <!--!Name!-->
> <!--!Description!-->
>
> and so on...
>
> I would like to know the regular expression to get (for instance) for
> this
> example, only the matches Name and Description without the start <!--!
> and
> the end !-->
>
> --
> Thanks
> Regards.
> Josema


Mar 10 '06 #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...
1
by: Kenneth McDonald | last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make...
3
by: Jamie Pittman via AccessMonster.com | last post by:
I am having trouble bellow wit this query. I have the total regular hours and the overtime. The problem is that if it is 8 hours and under, I need it to show as regular hours. Any thoughts? ...
4
by: Buddy | last post by:
Can someone please show me how to create a regular expression to do the following My text is set to MyColumn{1, 100} Test I want a regular expression that sets the text to the following...
1
by: Kenny M. | last post by:
Where can I learn to write Regular Expresions e.g. I need to validate the time format HH:mm a.m. it look simple. I want to use a regularExpression validator but It seem complicated to write...
7
by: Billa | last post by:
Hi, I am replaceing a big string using different regular expressions (see some example at the end of the message). The problem is whenever I apply a "replace" it makes a new copy of string and I...
1
by: Kamikazy | last post by:
Hi! Can someone tell me from where could I download regular expresions for programming language C? I'm working on a simple compiler and using Lex for creating Lexical Analyser so i need R.E....
25
by: Mike | last post by:
I have a regular expression (^(.+)(?=\s*).*\1 ) that results in matches. I would like to get what the actual regular expression is. In other words, when I apply ^(.+)(?=\s*).*\1 to " HEART...
4
by: jpluttme | last post by:
I need to replace not just the ASC or DESC but the value it's sorting by. i.e. in a string like this: http://www.mysite.com/page1.php?value=uservalue1&sort=ORDER+BY+uservalue1+DESC I've not had...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.