If I am provided with a .doc file with special tags in it, for example, [first_name], how can I replace all occurrences of it with something like "Clark"? A simple binary replacement only works if the replacement string is the same length.
Haskell, C and C ++ answers would be better, but any compiled language could do. I would also prefer to do this without an external library, as it needs to be deployed on Windows and Linux, and cross-platform dependency handling is a bitch.
Summarizing...
.doc -> magic program -> .doc with strings replaced
Word COM ( "Word.Application" ) Windows, , , . Windows .
, , - OpenOffice.org ODF, (ODF - , , zipped XML), , , .doc. OpenOffice.org Word (, ), ( OpenOffice.org, ).
, .docx, , .
Word.
, , . ; Word .
, , .Net(VB #) Word.Application, MS Word .
Word.Application
C/++/Haskell ? Haskell, , C . (Perl, Python ..) , .
With that said, as other posters noted, you still have to deal with eccentricities in the .doc format.
Source: https://habr.com/ru/post/1759202/More articles:Asp.Net Ajax - non-static method call - jqueryPHP randomly selects from a list - phpMongoid Best Practice: NestedResources - mongodbAdding only new items from one list to another - c #How to cancel Android notifications? - androidhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1759203/how-to-apply-css-to-aspfileupload-control&usg=ALkJrhjEcv092puPgHmMtfdAzOe163rOIwPulling data for next / previous months - jquerystyle drop-down lists (select) - cssDiscarding Inner Triangles - language-agnosticAre ASP.Net control identifiers for SEO and page size? - c #All Articles