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.
<sie...@barebones.com>                      <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 
"supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/472026DF-A091-4C22-B150-99BF4EA7D899%40barebones.com.

Reply via email to