On 10/2/19 at 5:01 AM, [email protected] (David Rostenne) wrote:

I was hoping for an alternative to the & in the replacement strung that means ‘entire source line’ but this works perfectly.

Surround the whole pattern with parentheses. That will then be the capture contained in \1. You will then have to increment each other capture by 1.

Original:
http://ftp.newedinburgh.ca/wp-content/uploads/2019/09/1976_04-April-New-Edinburgh-News_web.pdf

Pattern:
(.+?/2019/[019]+/([0-9]+)[_.]([0-9]+)-([a-zA-Z]+).*\n)

Replacement:
\4 \2, NEN PDF, \2/\3/01, \1

Result:
April 1976, NEN PDF, 1976/04/01, 
http://ftp.newedinburgh.ca/wp-content/uploads/2019/09/1976_04-April-New-Edinburgh-News_web.pdf

Note that the above pattern includes the end of line ("\n"); if you don't want that, move the closing parenthesis to before the "\n".

HTH
--

  - Bruce

_bruce__van_allen__santa_cruz__ca_

--
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 to the group.
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/r480Ps-10146i-E76E9325F0C54E60B0B97B9CF35E9C2E%40Forest.local.

Reply via email to