On Jan 26, 2024, at 05:49, Victoria Bampton <vict...@victoriabampton.com> wrote:
There's clearly lots of experience here... can anyone tell me if this is possible to do a find/replace GREP?
--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" 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 bbedit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/f3743619-5c95-4161-8107-b81affbdd6dan%40googlegroups.com.
Find: (?i)(href="[a-zA-Z/-]+\.x?html#)(?-i)([a-z]+?_[-a-z]*)([A-Z])
Replace: \1\2-\l\3
<a href="/premium-classic/before-you-start.xhtml#sub_KeepingLightroomUpdated">Keeping Lightroom Updated</a>
<a href="/premium-classic/before-you-start.xhtml#sub_-keepingLightroomUpdated">Keeping Lightroom Updated</a>
<a href="/premium-classic/before-you-start.xhtml#sub_-keeping-lightroom-updated">Keeping Lightroom Updated</a>
Find: (?i)(href="[a-zA-Z/-]+\.x?html#)(?-i)[a-z]+?_-
Replace: \1
<a href="/premium-classic/before-you-start.xhtml#keeping-lightroom-updated">Keeping Lightroom Updated</a>
Edit text in a scriptable manner. See also: awk, ed. More information: https://www.gnu.org/software/sed/manual/sed.html.
{{command}} | sed 's/apple/mango/g'
{{command}} | sed -E 's/(apple)/\U\1/g'
sed -i 's/apple/mango/g' {{path/to/file}}
{{command}} | sed -f {{path/to/script.sed}}
{{command}} | sed -n '1p'
sed -i 1d {{/path/to/file}}
sed -i '1i\your new line text\' {{/path/to/file}}
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/6bb20c24-2ca5-4858-9774-a33465439112n%40googlegroups.com.