Thanks for the sample. It looks sometimes the page number is on its own line, and sometimes it’s at the end of a line of text. There’s only one newline after it (not two as in your previous sample) and either a newline or a space before it. So try this:

Find: `[\r ](\d+)\r`
Replace: `\rPage \1\r`
Grep: `on`

PDFs are pretty hard to convert to plain text reliably because PDF is a display language and doesn’t really separate content from layout. If you can get your material in TEXT or HTML format you might have more luck.

Hope this helps!
-sam

On 30 Oct 2018, at 8:36, bo wrote:

I’m surprised that OSX or OSX-TextEdit or Preview -copy pasted unusable plain text… Yet this sort of format stuff is actually much more prevalent in geometry apps, so it should be understandable to me. So i learn and
thanks for this.

Here then is another sample, brought through the attachment function:


~bo

--
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 to the group.
Follow @bbedit on Twitter: <https://www.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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

--
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 to the group.
Follow @bbedit on Twitter: <https://www.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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to