You need to install
PSPad because simple text editors like
Notepad do not support
Regular Expressions.
Follow the download and installation instructions given in the
Knowledge Base at:
http://www.fhug.org.uk/wiki/doku.php?id ... pad_editor
Ensure you have a backup copy of your original GEDCOM file.
Run
PSPad and use
File > Open to open your original
GEDCOM (.ged) file.
Use
Search > Replace to open the
Replace pop-up window.
Clear the tick against
Case Sensitive
Set the tick against
Prompt Each Replace
Set the tick against
Regular Expressions
Now here are the
Regular Expression edit strings:
Find: 2 DATE (([0-9]{1,2}) JANUARY ([0-9]{4}))
Replace: 2 DATE $1 JAN $2
I suggest you copy & paste these into the
Find: &
Replace: boxes.
Click on the
List button and all matching occurrences will be listed in the
Search Results pane below.
Use
Search > Replace to open the
Replace pop-up window again and re-enter settings.
Click on the triangle at right-hand end of
Find: &
Replace: boxes to select previous edit strings.
Click on the
OK button and check replacement, then click
Yes to confirm.
When confident that all is OK, clear the tick against
Prompt Each Replace and click
OK to replace all remaining occurrences.
Repeat the above process eleven more times to replace
FEBRUARY with
FEB,
MARCH with
MAR, through to
DECEMBER with
DEC.
Use
File > Save to preserve your changes and check in FH.
Click on the
? at top right of
Replace window for help on
Regular Expressions.
How does this particular
Regular Expression work?
The
Find sub-strings are explained in turn:
2 DATE represents itself
( represents
( which is 'escaped' with to force its literal meaning
[0-9]{1,2} represents 1 or 2 digits 0-9 for day of month
JANUARY represents the month itself
[0-9]{4} represents exactly 4 digits 0-9 for the year
) represents
) which is 'escaped' with to force its literal meaning
The 'day of month' and the 'year' sub-expressions are enclosed in parentheses
( ) as explained below.
The
Replace sub-strings are explained in turn:
2 DATE represents itself
$1 represents the 1st sub-expression for 'day of month' found above
JAN represents itself
$2 represents the 2nd sub-expression for 'year' found above
I hope that makes sense and it all works OK for you.