[Novalug] Resolved: regex help

Roger W. Broseus rogerb@bronord.com
Fri Jul 4 14:03:30 EDT 2014


Thanks to Nick, Igor, and Richard. You guys are great - better than O'Rielly's 
"Regular Expressions."

Nick's link to regex help is very useful . . . I'll now use it in place of my 
cheat sheet.

--
Roger W. Broseus - Linux User
     Email: RogerB@bronord.com
     Web Site: www.bronord.com

On 07/04/2014 04:57 AM, novalug-request@calypso.tux.org wrote:
> Message: 2
> Date: Thu, 03 Jul 2014 18:00:42 -0400
> From: "Roger W. Broseus"<rogerb@bronord.com>
> Subject: [Novalug] regex help
> To: NOVALUG<novalug@calypso.tux.org>
> Message-ID:<53B5D28A.9080905@bronord.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I'm trying to clean up a Thunderbird address book saved out in .ldif format.
> The objective is to clean out a lot of strings and just leave the "meat."
>
> So, take a line that begins with
>
>       dn: cn=
>
> and is followed by arbitrary text including letters, numbers, punctuation
> marks, and characters like @ (as in an email address).
>
> I constructed a search string like this,
>
>       dn: cn=[^.]*
>
> This should find "dn: cn=" followed by zero or more of any character. However,
> the search stumbles on periods, stopping immediately before them. And, a
> string may have zero or more periods in it.
>
> Any suggestion on how to find an arbitrary string after the equal sign up to
> end of line? I can then search and replace with nothing and clean out a lot of
> cruft. Then I'll have a copy of my master email address book that I can easily
> search when my "home" T-burd is not available to me, e.g., when using a web
> interface. Export and import: I've been down that fruitless road before, not
> to mention, my client might be Squirrel mail, K-9 on my droid, gmail, or some
> other, depending on the circumstances.
>
> -- -- Roger W. Broseus - Linux User Email: RogerB@bronord.com Web Site: 
> www.bronord.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20140704/cd6eb695/attachment.htm>


More information about the Novalug mailing list