Hello,
At the moment I am trying to use the "search and redact" option in PDFTools. I need to add a pattern with which I can redact multiple files at once (batch-modus). I don't know how to create this pattern. Can anyone help?
In all files, there is structure like this:
Lastname, Surname (Organisation)
surname.lastname@organisation.nl
I want to redact it like this:
Lastname, Surname (Organisation) --> Only keep (Organisation) visibile
surname.lastname@organisation.nl --> only keep @organisation.nl visible
EDIT: for surname.lastname@organisation.nl, this worked: \b([A-Za-z0-9._%+-]+)(?=@). Now I still need Lastname, Surname. I can't fix this in Regex.
Is it possible to make a pattern for this in regex?
Kinds regards,
Bas
Redact names with PDFTools
Moderators: Daniel - PDF-XChange, PDF-XChange Support, Vasyl - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
- Roman - Tracker Supp
- Site Admin
- Posts: 332
- Joined: Sun Nov 21, 2004 3:19 pm
Re: Redact names with PDFTools
Hello basbeek,
Assuming the organization name has the same pattern as the last and first name (i.e. [A-Za-z0-9_%+-]+),
the regular expression for your first case can be:
\b[A-Za-z0-9_%+-]+\s*,\s*[A-Za-z0-9_%+-]+\s*(?=\([A-Za-z0-9_%+-]+\))
Assuming the organization name has the same pattern as the last and first name (i.e. [A-Za-z0-9_%+-]+),
the regular expression for your first case can be:
\b[A-Za-z0-9_%+-]+\s*,\s*[A-Za-z0-9_%+-]+\s*(?=\([A-Za-z0-9_%+-]+\))
Re: Redact names with PDFTools
Thank you, this works!
- Paul - PDF-XChange
- Site Admin
- Posts: 7358
- Joined: Wed Mar 25, 2009 10:37 pm
- Contact: