jch
Mon Apr 25 04:28:01 CDT 2005
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/default.asp?url=/library/en-us/cpgenref/html/cpcongroupingconstructs.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" <laser_lu@hotmail.com> escreveu na mensagem
> >>>>> news:48783632495855093125000@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.
>
>
>
>