[sword-devel] A reversible transform of an IMP file

David Haslam dfhdfh at protonmail.com
Fri Apr 11 14:10:02 EDT 2025


Dear friends who enjoy analysing SWORD modules:

Here's a useful transform to apply to the output of mod2imp.

Replace all PCRE "(<[^/])" by "\r\n\t$1" (without the quotes)

This inserts a new line and a single horizontal tab before each XML element in the text.
It excludes all XML end elements such as "</name>" that start with "</"

When many words are encoded (e.g. for Strong's, etc) the transformed file is easier to read.

The use of the horizontal tab ensures that the transform is 100% reversible, thus:

Replace all PCRE"\r\n\t" by ""

NB. The EOL is for Windows users.
Those of you on Linux or Mac can easily adapt as required.

Best regards,

David

Sent with [Proton Mail](https://pr.tn/ref/SWXT9A5YZ67G) secure email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20250411/4d0bd4a5/attachment.htm>


More information about the sword-devel mailing list