On 25 May 2021, at 18:17, Duncan Thorne <[email protected]> wrote:
> I'm stumped when it comes to reformatting a text line that begins with a $
> symbol. I want to replace the preceding line's line break, followed by the
> new line's $, with a tab-$.
> For instance:
> ... 2021
> $0.23
>
> changed to:
> ... 2021 (tab) $0.23
>
> BBEdit search-and-replace treats $ as a special search symbol, I gather to do
> with matching. Is there a way to make it see $ as a dollar sign?
I won't repeat what everyone else has said, but a few other notes.
As a shortcut, whenever you see a RED characters in the bbedit search field
that character is special, and throwing a \ in front of it will turn the pair
blue, which means it will not be the special grep character but instead an
escaped character.
\r is an escape for "return" character
\n which is an escape for a "newline" character
In nearly all BBEdit files, if not all, these are equivalent. This is not the
case in all editors however.
If you go to the Search Menu and then "Pattern Playground" you will see threee
items at the top next to the words "Search patter:" one looks like a g, one
looks like a clock, and only looks like a ? In a circle. The last will show a
long list of sample patters.
These same items appear int eh find/replace dialog, but the pattern playground
is an excellent place to see what the expressions you are typing will match in
the document, so I recommend starting there. It is very easy to then use the
pattern for a find and replace.
--
When the routine bites hard / and ambitions are low And the
resentment rides high / but emotions won't grow And we're
changing our ways, / taking different roads Then love, love will
tear us apart again
--
This is the BBEdit Talk public discussion group. If you have a feature request
or need technical support, please email "[email protected]" rather than
posting here. Follow @bbedit on Twitter: <https://twitter.com/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/AA3A1110-FA55-4D19-88DC-13AD9C74286E%40kreme.com.