Modify

Opened 12 years ago

Closed 12 years ago

#2616 closed Feature Request (Rejected)

StringRegExp - new example - request

Reported by: mlipok Owned by:
Milestone: Component: Documentation
Version: Severity: None
Keywords: Cc:

Description

Please make a one new example which show the difference between:
greedy / possessive / lazy

i think the best example (simplest) can be done by using this "methodes":

? 0 or 1, greedy. 
?+ 0 or 1, possessive. 
?? 0 or 1, lazy. 

justification:
in SRE these methodes are very important and used in many different ways:

? 0 or 1, greedy. 
?+ 0 or 1, possessive. 
?? 0 or 1, lazy. 

* 0 or more, greedy. 
*+ 0 or more, possessive. 
*? 0 or more, lazy. 

+ 1 or more, greedy. 
++ 1 or more, possessive. 
+? 1 or more, lazy. 

{x} exactly x. 

{x,y} at least x and no more than y, greedy. 
{x,y}+ at least x and no more than y, possessive. 
{x,y}? at least x and no more than y, lazy. 

{x,} x or more, greedy. 
{x,}+ x or more, possessive. 
{x,}? x or more, lazy. 

It would be good to make clear example showing the difference between these methods

I know that it is now a good description of the greatly expanded but always better example demonstrates the use, in other words:
code is better than words ;)

Attachments (0)

Change History (4)

comment:1 by J-Paul Mesnage, 12 years ago

why not,
just add the example you have in mind

comment:2 by mlipok, 12 years ago

during the weekend I'll try to prepare

comment:3 by TicketCleanup, 12 years ago

Version: 3.3.11.2

Automatic ticket cleanup.

comment:4 by guinness, 12 years ago

Resolution: Rejected
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.