searching for a string containing a certain character and appending that string to a new file

Hi :slight_smile:
We had a question a bit like this a few weeks ago and had some great
answers. Can anyone remember any of the command-line or text-editor
approaches?
Regards from
Tom :slight_smile:

Hi :slight_smile:
Errr, the context is that there is a list of local councillor's contact
details on a website and i kinda need to extract their email addresses.
There's about 42 of them and the listing on the website is a bit like this
(ie a bit variable)

Councillor Cheerful Chap

Twee Cottage Flat 68
58 Somewhereelse Street,
Tinytown,

XL28 3LX.

01234 123465
07891 234567
Click here to download Cheerful's contact details as VCard

Click here to download Cheerful's contact details as a CSV file

cheerful.chap@unlikelycompany.co.uk

Councillor Whosename

42 Suchandsuch Road,
Tinytown,

XS2 3ER.

012345 123465
Click here to download Whosename's contact details as VCard

Click here to download Whosename's contact details as a CSV file

whosename@wasememjig.com

Regards from
Tom :slight_smile:

You could probably delete everything except forty-two one-line paragraphs more quickly that writing this message, but possibly not reliably.

o Search for .+@.+ and replace by &# with "Regular expressions" ticked.
o Click Replace All.
o Now click Find All.
o Go to Edit | Copy (or Ctrl+C).
o In a new document (or wherever), go to Edit | Paste (or Ctrl+V).
o In the new text, search for # and replace with \n (or \t or comma or space or whatever).

I trust this helps.

Brian Barker

Hi :slight_smile:
Perfect!! Thanks :)))

It's not quite what i asked for but did get exactly the result i wanted and
it was nice to use LibreOffice to do it.
Fantastic! Thanks Brian!
Many regards from
Tom :slight_smile: