471,049 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

About a Regular Expression Grouping Construct

Hello, everybody,
do you know how to use this Grouping Construct?

(?> )

I've found its reference on MSDN, but still can not understand it totally.
The following is its description:

Nonbacktracking subexpression (also known as a "greedy" subexpression). The
subexpression is fully matched once, and then does not participate piecemeal
in backtracking. (That is, the subexpression matches only strings that would
be matched by the subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me an example:)
Thanks a lot!

Best regards,
Laser Lu.

Nov 17 '05 #1
12 2496
in the visual studio u can try the RegularExpressionValidator and there you
can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...
Hello, everybody,
do you know how to use this Grouping Construct?

(?> )

I've found its reference on MSDN, but still can not understand it totally.
The following is its description:

Nonbacktracking subexpression (also known as a "greedy" subexpression).
The subexpression is fully matched once, and then does not participate
piecemeal in backtracking. (That is, the subexpression matches only
strings that would be matched by the subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me an
example:) Thanks a lot!

Best regards,
Laser Lu.

Nov 17 '05 #2
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is only available
in ASP.NET Web Applications, and its built-in editor is simple. Both Regulator
and Expresso are better than it.

However, my question is what does the Grouping Construct '(?> )' mean? I
just need a sample code on how to use this construct:)

in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...
Hello, everybody,
do you know how to use this Grouping Construct?
(?> )

I've found its reference on MSDN, but still can not understand it
totally. The following is its description:

Nonbacktracking subexpression (also known as a "greedy"
subexpression). The subexpression is fully matched once, and then
does not participate piecemeal in backtracking. (That is, the
subexpression matches only strings that would be matched by the
subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me
an example:) Thanks a lot!

Best regards,
Laser Lu.


Nov 17 '05 #3
You can use the grouping construct for extracting parts of a string. For
example, say you want to extract the value of color (i.e. "red") from the
following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups property
to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}

HTH, Jakob.

"Laser Lu" wrote:
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is only available
in ASP.NET Web Applications, and its built-in editor is simple. Both Regulator
and Expresso are better than it.

However, my question is what does the Grouping Construct '(?> )' mean? I
just need a sample code on how to use this construct:)

in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...
Hello, everybody,
do you know how to use this Grouping Construct?
(?> )

I've found its reference on MSDN, but still can not understand it
totally. The following is its description:

Nonbacktracking subexpression (also known as a "greedy"
subexpression). The subexpression is fully matched once, and then
does not participate piecemeal in backtracking. (That is, the
subexpression matches only strings that would be matched by the
subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me
an example:) Thanks a lot!

Best regards,
Laser Lu.


Nov 17 '05 #4
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.

"Laser Lu" wrote:
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is
only available
in ASP.NET Web Applications, and its built-in editor is simple. Both
Regulator
and Expresso are better than it.
However, my question is what does the Grouping Construct '(?> )'
mean? I just need a sample code on how to use this construct:)
in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...

Hello, everybody,
do you know how to use this Grouping Construct?
(?> )
I've found its reference on MSDN, but still can not understand it
totally. The following is its description:

Nonbacktracking subexpression (also known as a "greedy"
subexpression). The subexpression is fully matched once, and then
does not participate piecemeal in backtracking. (That is, the
subexpression matches only strings that would be matched by the
subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me
an example:) Thanks a lot!

Best regards,
Laser Lu.


Nov 17 '05 #5
You can use the grouping construct for extracting parts of a string. For
example, say you want to extract the value of color (i.e. "red") from the
following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups property
to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}

HTH, Jakob.

"Laser Lu" wrote:
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is only available
in ASP.NET Web Applications, and its built-in editor is simple. Both Regulator
and Expresso are better than it.

However, my question is what does the Grouping Construct '(?> )' mean? I
just need a sample code on how to use this construct:)

in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...
Hello, everybody,
do you know how to use this Grouping Construct?
(?> )

I've found its reference on MSDN, but still can not understand it
totally. The following is its description:

Nonbacktracking subexpression (also known as a "greedy"
subexpression). The subexpression is fully matched once, and then
does not participate piecemeal in backtracking. (That is, the
subexpression matches only strings that would be matched by the
subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me
an example:) Thanks a lot!

Best regards,
Laser Lu.


Nov 17 '05 #6
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.

"Laser Lu" wrote:
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is
only available
in ASP.NET Web Applications, and its built-in editor is simple. Both
Regulator
and Expresso are better than it.
However, my question is what does the Grouping Construct '(?> )'
mean? I just need a sample code on how to use this construct:)
in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...

Hello, everybody,
do you know how to use this Grouping Construct?
(?> )
I've found its reference on MSDN, but still can not understand it
totally. The following is its description:

Nonbacktracking subexpression (also known as a "greedy"
subexpression). The subexpression is fully matched once, and then
does not participate piecemeal in backtracking. (That is, the
subexpression matches only strings that would be matched by the
subexpression alone.)

Can anybody tell me how to use it? If someone knows, please show me
an example:) Thanks a lot!

Best regards,
Laser Lu.


Nov 17 '05 #7
I am not sure I understand your question. "(?> )" defines af group. In my
example I used "(?> )" to define a group called "color".

Regards, Jakob.

"Laser Lu" wrote:
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.

"Laser Lu" wrote:
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is
only available
in ASP.NET Web Applications, and its built-in editor is simple. Both
Regulator
and Expresso are better than it.
However, my question is what does the Grouping Construct '(?> )'
mean? I just need a sample code on how to use this construct:)

in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...

> Hello, everybody,
> do you know how to use this Grouping Construct?
> (?> )
> I've found its reference on MSDN, but still can not understand it
> totally. The following is its description:
>
> Nonbacktracking subexpression (also known as a "greedy"
> subexpression). The subexpression is fully matched once, and then
> does not participate piecemeal in backtracking. (That is, the
> subexpression matches only strings that would be matched by the
> subexpression alone.)
>
> Can anybody tell me how to use it? If someone knows, please show me
> an example:) Thanks a lot!
>
> Best regards,
> Laser Lu.


Nov 17 '05 #8
I am not sure I understand your question. "(?> )" defines af group. In my
example I used "(?> )" to define a group called "color".

Regards, Jakob.

"Laser Lu" wrote:
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.

"Laser Lu" wrote:
Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is
only available
in ASP.NET Web Applications, and its built-in editor is simple. Both
Regulator
and Expresso are better than it.
However, my question is what does the Grouping Construct '(?> )'
mean? I just need a sample code on how to use this construct:)

in the visual studio u can try the RegularExpressionValidator and
there you can use your ExpString!

"Laser Lu" <la******@hotmail.com> escreveu na mensagem
news:48*********************@news.microsoft.com...

> Hello, everybody,
> do you know how to use this Grouping Construct?
> (?> )
> I've found its reference on MSDN, but still can not understand it
> totally. The following is its description:
>
> Nonbacktracking subexpression (also known as a "greedy"
> subexpression). The subexpression is fully matched once, and then
> does not participate piecemeal in backtracking. (That is, the
> subexpression matches only strings that would be matched by the
> subexpression alone.)
>
> Can anybody tell me how to use it? If someone knows, please show me
> an example:) Thanks a lot!
>
> Best regards,
> Laser Lu.


Nov 17 '05 #9
Hey Jakob, you used construct "(?<name> )", not "(?> )". They are not the
same:)
Please refer to
http://msdn.microsoft.com/library/de...constructs.asp
I am not sure I understand your question. "(?> )" defines af group.
In my example I used "(?> )" to define a group called "color".

Regards, Jakob.

"Laser Lu" wrote:
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.
"Laser Lu" wrote:

Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is
only available
in ASP.NET Web Applications, and its built-in editor is simple.
Both
Regulator
and Expresso are better than it.
However, my question is what does the Grouping Construct '(?> )'
mean? I just need a sample code on how to use this construct:)
> in the visual studio u can try the RegularExpressionValidator and
> there you can use your ExpString!
>
> "Laser Lu" <la******@hotmail.com> escreveu na mensagem
> news:48*********************@news.microsoft.com...
>
>> Hello, everybody,
>> do you know how to use this Grouping Construct?
>> (?> )
>> I've found its reference on MSDN, but still can not understand it
>> totally. The following is its description:
>> Nonbacktracking subexpression (also known as a "greedy"
>> subexpression). The subexpression is fully matched once, and then
>> does not participate piecemeal in backtracking. (That is, the
>> subexpression matches only strings that would be matched by the
>> subexpression alone.)
>>
>> Can anybody tell me how to use it? If someone knows, please show
>> me an example:) Thanks a lot!
>>
>> Best regards,
>> Laser Lu.


Nov 17 '05 #10
Hey Jakob, you used construct "(?<name> )", not "(?> )". They are not the
same:)
Please refer to
http://msdn.microsoft.com/library/de...constructs.asp
I am not sure I understand your question. "(?> )" defines af group.
In my example I used "(?> )" to define a group called "color".

Regards, Jakob.

"Laser Lu" wrote:
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.
"Laser Lu" wrote:

Hello Daniel, thank you:)
But I'd like to say that the RegularExpressionValidator control is
only available
in ASP.NET Web Applications, and its built-in editor is simple.
Both
Regulator
and Expresso are better than it.
However, my question is what does the Grouping Construct '(?> )'
mean? I just need a sample code on how to use this construct:)
> in the visual studio u can try the RegularExpressionValidator and
> there you can use your ExpString!
>
> "Laser Lu" <la******@hotmail.com> escreveu na mensagem
> news:48*********************@news.microsoft.com...
>
>> Hello, everybody,
>> do you know how to use this Grouping Construct?
>> (?> )
>> I've found its reference on MSDN, but still can not understand it
>> totally. The following is its description:
>> Nonbacktracking subexpression (also known as a "greedy"
>> subexpression). The subexpression is fully matched once, and then
>> does not participate piecemeal in backtracking. (That is, the
>> subexpression matches only strings that would be matched by the
>> subexpression alone.)
>>
>> Can anybody tell me how to use it? If someone knows, please show
>> me an example:) Thanks a lot!
>>
>> Best regards,
>> Laser Lu.


Nov 17 '05 #11
Sorry, my bad :-) In that case I am afraid I don't know.

Regards, Jakob.
"Laser Lu" wrote:
Hey Jakob, you used construct "(?<name> )", not "(?> )". They are not the
same:)
Please refer to
http://msdn.microsoft.com/library/de...constructs.asp
I am not sure I understand your question. "(?> )" defines af group.
In my example I used "(?> )" to define a group called "color".

Regards, Jakob.

"Laser Lu" wrote:
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.
"Laser Lu" wrote:

> Hello Daniel, thank you:)
> But I'd like to say that the RegularExpressionValidator control is
> only available
> in ASP.NET Web Applications, and its built-in editor is simple.
> Both
> Regulator
> and Expresso are better than it.
> However, my question is what does the Grouping Construct '(?> )'
> mean? I just need a sample code on how to use this construct:)
>> in the visual studio u can try the RegularExpressionValidator and
>> there you can use your ExpString!
>>
>> "Laser Lu" <la******@hotmail.com> escreveu na mensagem
>> news:48*********************@news.microsoft.com...
>>
>>> Hello, everybody,
>>> do you know how to use this Grouping Construct?
>>> (?> )
>>> I've found its reference on MSDN, but still can not understand it
>>> totally. The following is its description:
>>> Nonbacktracking subexpression (also known as a "greedy"
>>> subexpression). The subexpression is fully matched once, and then
>>> does not participate piecemeal in backtracking. (That is, the
>>> subexpression matches only strings that would be matched by the
>>> subexpression alone.)
>>>
>>> Can anybody tell me how to use it? If someone knows, please show
>>> me an example:) Thanks a lot!
>>>
>>> Best regards,
>>> Laser Lu.


Nov 17 '05 #12
I found this: http://brl.sourceforge.net/brl_6.html#SEC67

It seems that the construct is not implemented by .net.

HTH, Jakob.

"Laser Lu" wrote:
Hey Jakob, you used construct "(?<name> )", not "(?> )". They are not the
same:)
Please refer to
http://msdn.microsoft.com/library/de...constructs.asp
I am not sure I understand your question. "(?> )" defines af group.
In my example I used "(?> )" to define a group called "color".

Regards, Jakob.

"Laser Lu" wrote:
Hello Jakob,
Actually I wan to know what does "(?> )" mean? :)
You can use the grouping construct for extracting parts of a string.
For example, say you want to extract the value of color (i.e. "red")
from the following string:

string description color="red"

You can do this using the regular expression: color="(?<color>\S*)"

The following code uses the regular expression and the Match.Groups
property to print out the value "red":

Regex rgx = new Regex(@"color=\""(?<color>\S*)\""");
Match m = rgx.Match("a string description color=\"red\"");
if (m.Success)
{
string color = m.Groups["color"].Value;
Console.WriteLine(color);
}
HTH, Jakob.
"Laser Lu" wrote:

> Hello Daniel, thank you:)
> But I'd like to say that the RegularExpressionValidator control is
> only available
> in ASP.NET Web Applications, and its built-in editor is simple.
> Both
> Regulator
> and Expresso are better than it.
> However, my question is what does the Grouping Construct '(?> )'
> mean? I just need a sample code on how to use this construct:)
>> in the visual studio u can try the RegularExpressionValidator and
>> there you can use your ExpString!
>>
>> "Laser Lu" <la******@hotmail.com> escreveu na mensagem
>> news:48*********************@news.microsoft.com...
>>
>>> Hello, everybody,
>>> do you know how to use this Grouping Construct?
>>> (?> )
>>> I've found its reference on MSDN, but still can not understand it
>>> totally. The following is its description:
>>> Nonbacktracking subexpression (also known as a "greedy"
>>> subexpression). The subexpression is fully matched once, and then
>>> does not participate piecemeal in backtracking. (That is, the
>>> subexpression matches only strings that would be matched by the
>>> subexpression alone.)
>>>
>>> Can anybody tell me how to use it? If someone knows, please show
>>> me an example:) Thanks a lot!
>>>
>>> Best regards,
>>> Laser Lu.


Nov 17 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sehboo | last post: by
7 posts views Thread by Billa | last post: by
5 posts views Thread by Cylix | last post: by
8 posts views Thread by sri_san | last post: by
3 posts views Thread by Zeba | last post: by
5 posts views Thread by Noah Hoffman | last post: by

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.