You might have a hard time figuring out a pattern for this (as I guess that
the amount of white space in the file names might differ and the file names
may not follow a strict structure). You could write a script for the task.
Or – if it was a one-shot-task – I would do the following steps:

1. Search for: href="(.+?)"     replace with   \1    (using Grep): choose
"Extract" – this gives you a new file with all href-Strings in it
2. In the new file: Copy all text
3. Replace all whitespace with _ (an underscore)
3. (for Accents and other stuff add additionals search-replace steps here)
4. Add a tab to each line (you could use the "Prefix/Suffix" command in the
"Text" menu for that
5. Mark the column left of the tab ("column zeor") with a rectangular
selection (check the manual if you don't know how to do this)
6. Paste the copied text

Now you have a file with the structure
<old file name with spaces><tab><old_file_name_without_spaces>
Save this file and use it as a ad-hoc batch-search-replace source on your
orignal file: To do this, choose "Text" > "Canonize …". with your generated
file as a source.

That might just take a few minutes and may be an alternative for getting a
script right – if you have a lot of different files to process, a script
solution may be the wiser choice.

Roland



On Sat, Jul 8, 2023 at 4:03 PM David Puente <dpuen...@gmail.com> wrote:

> Hi folks,
> I need to find some trick to rename the text:
>
>     <resource type="webcontent"
> identifier="g989516e6a95da788733f48e98192a620"
> href="web_resources/Anotación 2019-07-08 151143.png">
>
> I need find all the .png names removing spaces and accents... Is there any
> pattern to make it possible? Thanks!!!!
>
> --
> This is the BBEdit Talk public discussion group. If you have a feature
> request or need technical support, please email "supp...@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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bbedit/6a83df15-0871-402a-8e0a-ce2995da0f3en%40googlegroups.com
> <https://groups.google.com/d/msgid/bbedit/6a83df15-0871-402a-8e0a-ce2995da0f3en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/CABybPXZK0nG4hLZDfA%2ByPBP%2BdmbxgZRVDFR%2BCaB9f7xwKhDYgQ%40mail.gmail.com.

Reply via email to