Hey Rich,

Thanks much for looking at this issue!
Okay, I closely read the material in Chapter 8 and explored the Pattern 
Playground, and I am pretty sure I understand what I read and saw.
I also feel I have a grasp of HOW wildcard Find and Replace commands are 
SUPPOSED to work.
Using a Subpattern structure, as also suggested by Kaveh, such as " 
(\d\d\.\d\d\.\d\d\d\d, 
\d\d:\d\d, )" does not seem to improve things.
What I am trying to accomplish does not seem that complicated to me, so I 
am really scratching my head here.
This software should have fairly stable basic functions after 30 years, no?
It looks to me like I may have encountered a straight-up BUG — in no case 
should a "\d" used to find a NUMERIC value produce a "d" ALPHABETIC value 
output.
That's just basic mixing apples and oranges, no? I really don't know what 
is going on here.
Can you PLEASE tell me what EXACT string(s) you think I should be using 
here to realize my desired output?
I would like to confirm this is an actual bug (given I am a noob to 
BBEdit), before I waste anyone's time with a bug report?
For your information I am using BBEdit 15.0.3 on MacOS 11.7.10, but I first 
encountered this problem on an earlier version of BBEdit and MacOS.

Thanks much for the help!

Marcus
On Wednesday, May 8, 2024 at 2:18:36 PM UTC+2 Rich Siegel wrote:

> On 8 May 2024, at 6:01, Marcus Abundis wrote:
>
> > Greetings,
> >
> > I am new to BBEdit (trying it out) and I have a problem in using the
> > standard “Find and Replace” window in BBEdit. Only the “Grep” and “Show
> > matches” boxes checked in that window (no other boxes checked), and the
> > situation unfolds as follows:
> >
> > TARGET STRING/FIELD: “ 29.12.2023, 10:23, ”
> > — Target values, held in varied records, with varied fields for each
> > record, all in one .CSV file.
> >
> > FIND STRING: “ \d\d\.\d\d\.\d\d\d\d, \d\d:\d\d, ”
> > — This Find String works exactly as I wish, no problems.
> >
> > REPLACE STRING: “;\d\d\.\d\d\.\d\d\d\d, \d\d:\d\d, ”
> > — This Replace String does NOT work as desired. I want to replace the
> > leading “ ” space with a “;” while RETAINING all original digital values.
>
> Chapter 8 of the user manual is an excellent reference to how Grep works 
> (in BBEdit and in general), and in particular the section on "Writing 
> Replacement Patterns" beginning on page 212 is relevant to your interests.
>
> To summarize: you need to specify in your original pattern which part(s) 
> it you want to use in the replacement, by putting parentheses around them. 
> In the replacement pattern, you can make reference to those subpatterns to 
> construct the replacement text.
>
> The user manual is available via the Help menu.
>
> The Pattern Playground (on the Search menu) is handy for exploring match 
> and replace behavior, as well.
>
> Enjoy,
>
> R.
>
>
> -- 
> Rich Siegel Bare Bones Software, Inc.
> <[email protected]> <https://www.barebones.com/>
>
> Someday I'll look back on all this and laugh... until they sedate me.
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or believe that the application isn't working correctly, please email 
"[email protected]" rather than posting here. Follow @bbedit on Mastodon: 
<https://mastodon.social/@bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/005e25e9-132d-40ab-bae0-ee160c8cc4adn%40googlegroups.com.

Reply via email to