ZTree.com  | ZEN  | About...  

 Index   Back

Rule #5 needs to sink in   [Discuss]

By: Slobodan Vujnovic   Homepage   France  
Date: Jun 27,2002 at 01:42
In Response to: RFR - Wildcards (John Gruener)


> 1. Two wildcards will be supported: The question mark and asterisk.
> 2. Wildcards will have the same meaning as they do in the rename mask.
> 3. If no wildcards are used in the find string, then none may be used in the
> replace string.
> 4. If wildcards are used in the find string then they are optional in the
> replace string.
> 5. Wildcards used in the replace string must correspond in type and number to
> those used in the find string.
> 6. Wildcards in the find string may be used only between two valid filename
> characters.

Incredible work Kim and John, thanks again!!!

> Example file name: ABEF.ABCDEF.ABC

> Embedded asterisks in find:
> "B*E"3" = A3F.A3F.ABC
OK

> "B*E"3456" = A3456F.A3456F.ABC
OK

> "B*E"*" = AF.ACDF.ABC
I'm having a problem understanding the rule (Rule #5?) behind this one. It appears that a '*' in the replace string will keep(?) in the matched part of the name the number of matching chars.

1. In ABEF there are ZERO chars between BandE, so the resulting string is AF.

2. In ABCDEF there are TWO chars between BandE, C and D, resulting in ACDF.

> "B*E"34*" = A34F.A34CDF.ABC
> "B*E"*56" = A56F.ACD56F.ABC
> "B*E"34*56" = A3456F.A34CD56F.ABC

These are consistent with the above reasoning, but is this clear to everybody -- do we need a rule to define this better? Rule #5 does talk about the number, but the wording could maybe be more explicit?

I think I'm confused because in all other contexts, like Filespec, B*E would match BxxxE and both B and E would appear in a selection; here, they disappear -- but LEAVE the stuff they enclose alone...

If using this is tough, imagine the coding part :-)

1,628 views      
Thread locked
 

Messages in this Thread

 
96,640 Postings in 12,231 Threads, 350 registered users, 44 users online (0 registered, 44 guests)
Index | Admin contact |   Forum Time: Apr 18, 2024 - 2:38 am UTC  |  Hits:62,906,588  (1,012 Today )
RSS Feed