David,
In TMG, [ and ] have a special meaning. TMG is ignoring it in this case, but it won’t always do so, and other programs may or may respond the same way. I suggest you escape the special characters, i.e., replace “Register of Burials [1941-1992]” with “Register of Burials \[1941-1992\]”. The backslashes tell the parser to ignore the special meaning of [ and ].
Regarding the removal of the italic codes, I will look into it.
John Cardinal
Products: ORA, GedSite, Gedcom Publisher, Second Site, TMG Utility, TMG to GEDCOM
Web Hosting for Genealogists: Family History Hosting
David,
You can probably use the Find and Replace feature in TMG Utility. I strongly suggest that you do a dry run first where you have the “Log Only” option checked. If you use “[:CR:]” or some other printer code in a source element value, that will get broken. So, review the list of possible changes to see if there are any issues. If there are, you can either:
or
This should get you started:
TMG Utility v7.5.0
Copyright (C) 1999-2023 by John Cardinal. All Rights Reserved. Do not redistribute.
Function=Find and Replace
Project=test_ (C:\TMG Projects\test\test_)
Dataset=test / My Data Set
Log Only=True
Started at 16:46:18
Options:
Field: Source Subfields
Find what: (^|[^\\])(\[|\])
Replace with: $1\$2
Contents must match Find What exactly: Unchecked
Use Pattern Matching: Checked
Match case: Unchecked
Find Whole Word Only: <na>
-------------
Source#, Info
14, 'Mackenzie, P. [Paul] W.', 'Mackenzie, P.\[Paul\] W.'
Finished at 16:46:18
Elapsed Time=0 seconds
Records=22
Changed fields=1
Copy/paste the “Find what” and “Replace with” values. They are not for the feint of heart.
David,
A handy trick for understanding a regular expression (regex) written by someone else is to copy and paste it into https://regex101.com. It provides an explanation pane:

For a regex used by TMG Utility, you should set the “Flavor” to “.NET C#)”. TMGU predates .NET, so that’s a bit of a stretch, but the regex used by TMGU follows the same rules as in .NET (C#).
For a regex used in JavaScript, set the flavor to “ECMAScript (JavaScript)”. That’s the right choice for working with a regex used in ORA.
https://regex101.com does more than just explain, of course.
John Cardinal
Products: ORA, GedSite, Gedcom Publisher, Second Site, TMG Utility, TMG to GEDCOM
Web Hosting for Genealogists: Family History Hosting
From: t2...@googlegroups.com <t2...@googlegroups.com> On Behalf Of David Crouch
Sent: Monday, October 16, 2023 7:56 PM
To: TMG to GEDCOM <t2...@googlegroups.com>
Subject: Re: [T2G] Parsing Behaviour in Source Citations
Hi John,
Thank you for your e-mail and helpful suggestions. I am glad that you provided the template for the find and replace. It took me a long time to understand what you were doing. I have run the changes in "Log Only" mode and generated 15 pages of output. Everything looks fine but I will look it over again tomorrow morning with fresh eyes before removing the "Log Only" mode.