By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,353 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,353 IT Pros & Developers. It's quick & easy.

About a Regular Expression Grouping Construct

P: n/a
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
Share this Question
Share on Google+
12 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.