* Regular expressions in PSPAD

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
RogerF
Famous
Posts: 182
Joined: 26 Apr 2009 16:32
Family Historian: V6.2
Location: Oxfordshire, England
Contact:

Regular expressions in PSPAD

Post by RogerF » 21 Nov 2016 13:07

Sorry, not a FH question, but related.

I want to edit my GEDCOM using PSPAD. I'm looking for a multi-line string, of the form

Code: Select all

1 CHR
2 DATE 7 JUN 1840
2 PLAC Wallingford, BRK
From my recollection of regular expressions, the regex

Code: Select all

1 CHR\n2 DATE .*\n2 PLAC Wallingford, BRK
should work, but I can't persuade PSPAD to accept it, or indeed any variant that I can think of. Any PSPAD experts know what's wrong? Thanks
Roger Firth, using FH to research the FIRTHs of Lancashire and Yorkshire, and the residents of the market town where I live.

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Regular expressions in PSPAD

Post by Jane » 21 Nov 2016 13:16

PSPad does not play well with multiline entries out of the box.

See this extension which Mike posted to the Knowledge Base

fhugdownloads:contents:pspad_phreplace|phReplace
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Regular expressions in PSPAD

Post by tatewise » 21 Nov 2016 13:23

Depending on exactly what you want to edit, the Search and Replace Plugin may do the job more easily.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
RogerF
Famous
Posts: 182
Joined: 26 Apr 2009 16:32
Family Historian: V6.2
Location: Oxfordshire, England
Contact:

Re: Regular expressions in PSPAD

Post by RogerF » 21 Nov 2016 14:26

Thank you both. The phdesign URL has changed to http://phdesign.com.au/phreplace/ but, after following the instructions there, I still can't get it to work. I have S & R; I'll see if it can do what I want. Thanks again.
Roger Firth, using FH to research the FIRTHs of Lancashire and Yorkshire, and the residents of the market town where I live.

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Regular expressions in PSPAD

Post by Valkrider » 21 Nov 2016 14:51

Doesn't Notepad++ do multi-line search and replace too?

avatar
jbtapscott
Superstar
Posts: 483
Joined: 19 Nov 2014 17:52
Family Historian: V7
Location: Corfu, Greece
Contact:

Re: Regular expressions in PSPAD

Post by jbtapscott » 21 Nov 2016 15:16

Yes - I've just used it to insert a new line in a Search & Replace action.
Brent Tapscott ~ researching the Tapscott and Wallace family history
Tapscott & Wallace family tree

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Regular expressions in PSPAD

Post by tatewise » 21 Nov 2016 15:22

Roger, thank you for the updated URL to the DLL.

I have updated the fhugdownloads:contents:pspad_phreplace|> Utility ~ PSPad phReplace Multiline Search and Replace advice and made adjustments for Windows 10. The DLL version number has not changed and all the download files are exactly the same so should still install as before. You did extract the .zip file contents using right-click Extract All?

Where exactly did the installation process breakdown, because there are several workaround steps?

(Interestingly, despite going through a Windows 7 to Windows 10 free upgrade, the PSPad phreplace multi-line feature is still working OK.)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
RogerF
Famous
Posts: 182
Joined: 26 Apr 2009 16:32
Family Historian: V6.2
Location: Oxfordshire, England
Contact:

Re: Regular expressions in PSPAD

Post by RogerF » 22 Nov 2016 07:47

Mike, I extracted the files and placed them where stated. But thereafter, the Scripts entry on the menubar, which had previously listed three or so scripts, now merely offered Recompile scripts. Clicking on that had no effect.

UPDATE: I uninstalled then reinstalled PSPAD, added the regex files... and it worked. Thanks again.
Roger Firth, using FH to research the FIRTHs of Lancashire and Yorkshire, and the residents of the market town where I live.

Post Reply