| ||
This can get quite complex, especially if wildcards are specified in both the find and replace strings, and no limitations are put on them. The first solution, and the simplest approach, is to not permit wildcards at all. Most basic F&R operations can be performed without them, including deletion and insertion. Examples:
File name: ABEF.ABCDEF.ABC If wildcards are to be permitted, then a set of rules must be established. It will be up to Kim of course whether and when wildcards might be supported, and what limitations might be imposed. The basic limitation in the following set of rules is that the replace wildcards cannot represent a different number of characters than are found by the find wildcards, (rule 5). To avoid that limitation would require still more rules. I think that would be beyond what RFR needs to do, at least initially. Before suggesting the wildcard rules, the following two rules should be understood for all RFR operations, (wildcards or not):
1. Filenames will be searched from left to right, replacing matching strings as they are found. Here then are my suggested wildcard rules:
1. Two wildcards will be supported: The question mark and asterisk. Example file name: ABEF.ABCDEF.ABC
Embedded asterisks in find:
Embedded question marks in find: The limitation in the above rules that allows only embedded wildcards in the find string, (rule 6) is to initially give Kim an option of keeping the first wildcard implementation relatively simple and less error-prone. He could further simplify things by initially permitting only the asterisks, or by permitting wildcards in the find string but not the replace string.
Now, if we were to eliminate rule 6 entirely, all wildcards could then be used anywhere. Example file name: ABEF.ABCDEF.ABC
Leading and trailing question marks only in find:
Leading and trailing asterisks only in find:
Leading and trailing question marks in find and replace:
Leading and trailing asterisks in find and replace:
Mixed position question marks:
Mixed position asterisks: Obviously even more complex combinations of wildcards could be used, and it would be up to the user to be sure that the strings made sense, and did not do damage. (A significant potential for damage is present if one uses a leading or trailing asterisk in the find string, and does not use it in the replace string). It should be evident that without a strict set of rules, the use of wildcards could lead to many questions as to how they should be interpreted. In fact, there may still be some questions, although I think these rules will avoid most, if not all of them. It should also be evident that even with imposed limitations, a considerable find and replace capability would be available. Of course we could still want more, but I think this is a good start. Finally, it should also be evident that supporting wildcards in RFR is not a trivial task, and is as complex as the rename mask itself, if not more so. It would be understandable if Kim decides not to support wildcards at all in the initial RFR implementation. Any questions? ;-)
- John | ||
|
Messages in this Thread
- [Discuss] Rename Find and Replace (4,044) - John Gruener - Jun 16,2002 at 11:22 [Discuss]
- [Discuss] Rename Find and Replace (2,202) - Pat Gilbert - Jun 16,2002 at 14:44
- [Discuss] RFR - The Period (1,914) - John Gruener - Jun 17,2002 at 04:25
- [Discuss] RFR - The Period (1,901) - Juergen Hestermann - Jun 17,2002 at 06:59
- [Discuss] RFR - The Period (1,895) - John Gruener - Jun 17,2002 at 11:53
- [Discuss] RFR - The Period (1,917) - Juergen Hestermann - Jun 17,2002 at 17:32
- [Discuss] RFR - The Period (1,910) - Slobodan Vujnovic - Jun 18,2002 at 01:56
- [Discuss] RFR - The Period (1,775) - Juergen Hestermann - Jun 18,2002 at 02:42
- [Discuss] RFR - The Period (1,808) - Slobodan Vujnovic - Jun 18,2002 at 03:05
- [Discuss] RFR - The Period (1,775) - Juergen Hestermann - Jun 18,2002 at 02:42
- [Discuss] RFR - The Period (1,895) - John Gruener - Jun 17,2002 at 11:53
- [Discuss] RFR - The Period (1,901) - Juergen Hestermann - Jun 17,2002 at 06:59
- [Discuss] RFR - Open Parsing (1,989) - John Gruener - Jun 17,2002 at 06:02
- Cart before the horse please (1,783) - Michael Kahn - Jun 17,2002 at 07:19
- Cart before the horse please (1,823) - John Gruener - Jun 17,2002 at 07:55
- Cart before the horse please (1,846) - Jim Farnsworth - Jun 17,2002 at 10:03
- Cart before the horse please (1,802) - Steve Rawling - Jun 17,2002 at 12:19
- Cart before the horse please (1,846) - Jim Farnsworth - Jun 17,2002 at 10:03
- I've accepted LFN's as a fact of life (1,905) - Slobodan Vujnovic - Jun 17,2002 at 19:37
- I've accepted LFN's as a fact of life (1,930) - Michael Kahn - Jun 18,2002 at 06:19
- I've accepted LFN's as a fact of life (1,810) - Jim Farnsworth - Jun 18,2002 at 09:37
- I've accepted LFN's as a fact of life (1,889) - Slobodan Vujnovic - Jun 18,2002 at 23:30
- I've accepted LFN's as a fact of life (1,814) - Jim Farnsworth - Jun 18,2002 at 23:56
- I've accepted LFN's as a fact of life (1,811) - Michael Kahn - Jun 18,2002 at 23:57
- I've accepted LFN's as a fact of life (1,768) - Jim Farnsworth - Jun 19,2002 at 00:06
- I've accepted LFN's as a fact of life (1,889) - Slobodan Vujnovic - Jun 18,2002 at 23:30
- BG (1,826) - Slobodan Vujnovic - Jun 18,2002 at 23:39
- BG (1,759) - Michael Kahn - Jun 19,2002 at 01:12
- I've accepted LFN's as a fact of life (1,810) - Jim Farnsworth - Jun 18,2002 at 09:37
- I've accepted LFN's as a fact of life (1,930) - Michael Kahn - Jun 18,2002 at 06:19
- Cart before the horse please (1,823) - John Gruener - Jun 17,2002 at 07:55
- Cart before the horse please (1,783) - Michael Kahn - Jun 17,2002 at 07:19
- [Discuss] RFR - The Period (1,914) - John Gruener - Jun 17,2002 at 04:25
- [Discuss] Rename Find and Replace (1,825) - Steve Rawling - Jun 16,2002 at 15:29
- [Discuss] RFR - The Period (1,865) - John Gruener - Jun 17,2002 at 04:36
- [Discuss] RFR - The Period (1,789) - Steve Rawling - Jun 17,2002 at 07:14
- [Discuss] RFR - The Period (1,865) - John Gruener - Jun 17,2002 at 04:36
- [Discuss] Rename Find and Replace (1,876) - Juergen Hestermann - Jun 16,2002 at 20:34
- [Discuss] RFR - Case Sensitivity (1,937) - John Gruener - Jun 17,2002 at 07:06
- [Discuss] RFR - Replacement Sequence (1,773) - John Gruener - Jun 17,2002 at 12:13
- [Discuss] Rename Find and Replace (1,591) - Jim Farnsworth - Jun 16,2002 at 23:48
- [Opinion] Most Important Missing Capability (1,742) - John Gruener - Jun 18,2002 at 00:44
- [Opinion] Most Important Missing Capability (1,778) - Kim Henkel - Jun 18,2002 at 00:47
- pretty much agree with that one [no msg] (1,782) - Jim Farnsworth - Jun 18,2002 at 01:29
- I also agree [no msg/no dot] (1,739) - Michael Kahn - Jun 18,2002 at 02:19
- [Opinion] Most Important Missing Capability (1,742) - John Gruener - Jun 18,2002 at 00:44
- Cart before the horse please (1,873) - David Wall - Jun 17,2002 at 08:03
- Cart before the horse please (1,792) - John Gruener - Jun 17,2002 at 08:13
- Cart before the horse please (1,697) - Slobodan Vujnovic - Jun 17,2002 at 20:20
- Not easy... (1,902) - Slobodan Vujnovic - Jun 18,2002 at 08:29
- Not easy but Some examples (2,137) - Steve Rawling - Jun 18,2002 at 11:15
- Possible solution (1,939) - Juergen Hestermann - Jun 18,2002 at 18:02
- Very nice! (1,869) - Slobodan Vujnovic - Jun 18,2002 at 22:58
- Possible solution (2,004) - Steve Rawling - Jun 19,2002 at 12:48
- Very light-weight for today's needs (1,894) - Slobodan Vujnovic - Jun 18,2002 at 20:56
- [Discuss] RFR - Making Progress (1,835) - John Gruener - Jun 19,2002 at 04:19
- [Discuss] RFR - Making Progress (1,975) - Juergen Hestermann - Jun 19,2002 at 06:56
- [Discuss] RFR - Making Progress (1,760) - John Gruener - Jun 19,2002 at 07:25
- Regex (1,731) - Steve Rawling - Jun 19,2002 at 09:34
- Making it very modular? (1,807) - Slobodan Vujnovic - Jun 20,2002 at 02:53
- Agree, that makes sense. (1,760) - Jim Farnsworth - Jun 20,2002 at 03:35
- Making it very modular? (1,669) - Steve Rawling - Jun 20,2002 at 07:21
- Simple design, complex application (1,803) - Slobodan Vujnovic - Jun 20,2002 at 20:15
- Simple design, complex application (1,802) - Steve Rawling - Jun 20,2002 at 21:37
- dir\file = name.ext similarity (1,777) - Slobodan Vujnovic - Jun 20,2002 at 22:44
- dir\file = name.ext would add confusion. (1,754) - Steve Rawling - Jun 21,2002 at 09:03
- RFR - Rename Mask Command? (1,551) - John Gruener - Jun 21,2002 at 09:45
- RFR - Rename Mask Command? (1,589) - Steve Rawling - Jun 21,2002 at 09:57
- dir\file = name.ext would add confusion. (1,645) - Juergen Hestermann - Jun 21,2002 at 17:19
- RFR - Rename Mask Command? (1,551) - John Gruener - Jun 21,2002 at 09:45
- dir\file = name.ext would add confusion. (1,754) - Steve Rawling - Jun 21,2002 at 09:03
- dir\file = name.ext similarity (1,777) - Slobodan Vujnovic - Jun 20,2002 at 22:44
- Simple design, complex application (1,460) - Juergen Hestermann - Jun 21,2002 at 02:38
- Simple design, complex application (1,556) - Steve Rawling - Jun 21,2002 at 11:07
- Simple design, complex application (1,605) - Juergen Hestermann - Jun 21,2002 at 17:19
- Simple design, simple maintenance (1,687) - Slobodan Vujnovic - Jun 21,2002 at 18:25
- Simple design, simple maintenance (1,626) - Steve Rawling - Jun 24,2002 at 17:11
- Simple design, simple maintenance (1,567) - Slobodan Vujnovic - Jun 24,2002 at 18:33
- Simple design, simple maintenance (1,529) - Michael Kahn - Jun 25,2002 at 00:43
- Simple design, simple maintenance (1,567) - Slobodan Vujnovic - Jun 24,2002 at 18:33
- Simple design, simple maintenance (1,626) - Steve Rawling - Jun 24,2002 at 17:11
- Simple design, complex application (1,556) - Steve Rawling - Jun 21,2002 at 11:07
- Simple design, complex application (1,802) - Steve Rawling - Jun 20,2002 at 21:37
- Simple design, complex application (1,803) - Slobodan Vujnovic - Jun 20,2002 at 20:15
- Making it very modular? (1,750) - Juergen Hestermann - Jun 20,2002 at 07:47
- Making it very modular? (1,750) - Steve Rawling - Jun 20,2002 at 09:13
- Making it very modular? (1,587) - Juergen Hestermann - Jun 20,2002 at 17:25
- Making it very modular? (1,626) - Slobodan Vujnovic - Jun 20,2002 at 20:36
- Making it very modular? (1,625) - John Gruener - Jun 20,2002 at 10:35
- Making it very modular? (1,588) - Juergen Hestermann - Jun 20,2002 at 17:04
- Keeping the language simple a valid goal (1,698) - Slobodan Vujnovic - Jun 20,2002 at 20:46
- Keeping the language simple a valid goal (1,619) - Steve Rawling - Jun 20,2002 at 21:48
- RFR - Ambiguity (1,529) - John Gruener - Jun 21,2002 at 00:18
- RFR - Ambiguity (1,597) - Slobodan Vujnovic - Jun 21,2002 at 00:52
- RFR - Ambiguity (1,657) - Steve Rawling - Jun 21,2002 at 08:32
- RFR - Ambiguity (1,601) - John Gruener - Jun 21,2002 at 09:21
- RFR - Ambiguity (1,807) - Steve Rawling - Jun 21,2002 at 09:52
- RFR - Ambiguity (1,564) - Juergen Hestermann - Jun 21,2002 at 17:19
- RFR - .Ambiguity (1,669) - Steve Rawling - Jun 22,2002 at 16:40
- RFR - .Ambiguity (1,800) - Juergen Hestermann - Jun 22,2002 at 18:04
- RFR - .Ambiguity (1,638) - Steve Rawling - Jun 24,2002 at 11:52
- RFR - .Ambiguity (1,929) - Juergen Hestermann - Jun 25,2002 at 05:07
- RFR - .Ambiguity (1,931) - Steve Rawling - Jun 25,2002 at 08:39
- RFR - My fault (1,512) - Graeme Hoose - Jun 27,2002 at 02:40
- Deleting posts in the middle of a thread (1,609) - Steve Rawling - Jun 29,2002 at 15:40
- Deleting posts in the middle of a thread (1,726) - Graeme Hoose - Jun 29,2002 at 22:45
- Deleting posts in the middle of a thread (1,609) - Steve Rawling - Jun 29,2002 at 15:40
- RFR - My fault (1,512) - Graeme Hoose - Jun 27,2002 at 02:40
- More hard facts :-) (1,635) - Slobodan Vujnovic - Jun 25,2002 at 23:13
- More hard facts :-) (1,655) - Michael Kahn - Jun 26,2002 at 00:12
- More hard facts :-) (1,660) - Juergen Hestermann - Jun 26,2002 at 04:43
- far out and solid(dot) (1,469) - Steve Rawling - Jun 26,2002 at 09:01
- RFR - .Ambiguity (1,931) - Steve Rawling - Jun 25,2002 at 08:39
- RFR - .Ambiguity (1,800) - Juergen Hestermann - Jun 22,2002 at 18:04
- RFR - .Ambiguity (1,669) - Steve Rawling - Jun 22,2002 at 16:40
- RFR - Ambiguity (1,601) - John Gruener - Jun 21,2002 at 09:21
- RFR - Ambiguity (1,529) - John Gruener - Jun 21,2002 at 00:18
- Keeping the language simple a valid goal (1,619) - Steve Rawling - Jun 20,2002 at 21:48
- Keeping the language simple a valid goal (1,698) - Slobodan Vujnovic - Jun 20,2002 at 20:46
- Making it very modular? (1,588) - Juergen Hestermann - Jun 20,2002 at 17:04
- Making it very modular? (1,558) - Slobodan Vujnovic - Jun 20,2002 at 20:29
- Making it very modular? (1,579) - Juergen Hestermann - Jun 21,2002 at 02:26
- Making it very modular? (1,750) - Steve Rawling - Jun 20,2002 at 09:13
- RFR - More Progress (1,779) - John Gruener - Jun 20,2002 at 10:14
- RFR - More Progress (1,674) - Steve Rawling - Jun 20,2002 at 10:49
- RFR - More Progress (1,786) - John Gruener - Jun 20,2002 at 11:39
- RFR - More Progress (1,630) - Steve Rawling - Jun 20,2002 at 12:03
- RFR - Words (1,557) - John Gruener - Jun 21,2002 at 00:42
- RFR - Words (1,547) - Steve Rawling - Jun 21,2002 at 09:36
- RFR - Pattern Matching (1,520) - John Gruener - Jun 21,2002 at 10:10
- RFR - Pattern Matching (1,712) - Jim Farnsworth - Jun 21,2002 at 10:52
- RFR - Pattern Matching (1,766) - Steve Rawling - Jun 21,2002 at 11:01
- RFR - Pattern Matching (1,520) - John Gruener - Jun 21,2002 at 10:10
- RFR - Words (1,547) - Steve Rawling - Jun 21,2002 at 09:36
- RFR - Words (1,557) - John Gruener - Jun 21,2002 at 00:42
- RFR - More Progress (1,630) - Steve Rawling - Jun 20,2002 at 12:03
- RFR - More Progress (1,786) - John Gruener - Jun 20,2002 at 11:39
- RFR - More Progress (1,674) - Steve Rawling - Jun 20,2002 at 10:49
- Example #2 (1,610) - Slobodan Vujnovic - Jun 20,2002 at 23:14
- [Discuss] RFR - Making Progress (1,975) - Juergen Hestermann - Jun 19,2002 at 06:56
- Example #1 (1,602) - Slobodan Vujnovic - Jun 20,2002 at 22:13
- RFR - The Command Separator (1,762) - John Gruener - Jun 21,2002 at 01:48
- RFR - The Command Separator (1,666) - Slobodan Vujnovic - Jun 21,2002 at 02:21
- RFR - Operator Command Summary (1,682) - John Gruener - Jun 21,2002 at 02:46
- Ignore mimic not clear (1,610) - Slobodan Vujnovic - Jun 21,2002 at 19:09
- RFR - Mimic or Not? (1,544) - John Gruener - Jun 22,2002 at 06:43
- Ignore mimic not clear (1,610) - Slobodan Vujnovic - Jun 21,2002 at 19:09
- RFR - Changing Case (1,546) - John Gruener - Jun 24,2002 at 00:44
- RFR - Changing Case (1,460) - Michael Kahn - Jun 24,2002 at 06:22
- RFR - Changing Case (1,717) - John Gruener - Jun 24,2002 at 06:43
- RFR - Changing Case (1,637) - Michael Kahn - Jun 24,2002 at 07:49
- RFR - Changing Case (1,553) - John Gruener - Jun 24,2002 at 09:15
- RFR - Changing Case (1,647) - Michael Kahn - Jun 24,2002 at 09:29
- RFR - Changing Case (1,608) - John Gruener - Jun 24,2002 at 09:45
- RFR - Changing Case (1,647) - Michael Kahn - Jun 24,2002 at 09:29
- RFR - Changing Case (1,553) - John Gruener - Jun 24,2002 at 09:15
- RFR - Changing Case (1,637) - Michael Kahn - Jun 24,2002 at 07:49
- RFR - Changing Case (1,556) - Juergen Hestermann - Jun 24,2002 at 07:11
- RFR - Changing Case (1,717) - John Gruener - Jun 24,2002 at 06:43
- RFR - Changing Case (1,460) - Michael Kahn - Jun 24,2002 at 06:22
- RFR - Wildcards (1,872) - John Gruener - Jun 24,2002 at 07:33
- RFR - Wildcards (1,969) - Steve Rawling - Jun 24,2002 at 09:53
- Rule #5 needs to sink in (1,619) - Slobodan Vujnovic - Jun 27,2002 at 01:42
- Please read the release notes ;-) (1,573) - Kim Henkel - Jun 27,2002 at 01:46
- It's the theoretical part (1,696) - Slobodan Vujnovic - Jun 27,2002 at 02:11
- The "Theoretical" Part - It's Not Rule 5 (1,991) - John Gruener - Jun 27,2002 at 03:09
- The "Theoretical" Part - It's Not Ru (1,595) - Slobodan Vujnovic - Jun 28,2002 at 00:18
- Please read the release notes ;-) (1,573) - Kim Henkel - Jun 27,2002 at 01:46
- RFR - Summary Here (1,515) - John Gruener - Jun 26,2002 at 05:02
- [Discuss] Rename Find and Replace (2,202) - Pat Gilbert - Jun 16,2002 at 14:44