Thank you choroba and also many thanks to AppleFritter

I do not have to change the structure of the file, it is just about replacing some strings. Chances are this has to be put into a 'proper' script at some stage (I will surely try out the XPath variant)

As for the file, I can post a small snippet, which I had to modify. I changed the content but the structure is the same. Sorry for not having initiallly posted the snippet.

<tu creationdate="12345Z" changedate="12345" creationid="John Doe" cha +ngeid="John DOE" srclang="en-US"> <prop type="user-defined">server:xyz</prop> <prop type="user-defined">quality:100</prop> <prop type="user-defined">storing mode:1</prop> <prop type="user-defined">uncontrolled:0</prop> <prop type="user-defined">lastuser:unknown</prop> <prop type="user-defined">context left:1;2;3;4;5;6;7;8;9;10;11 +;12;13;14;15;16;17;18;19;20</prop> <prop type="user-defined">context right:21;22;23;24;25;26;27;2 +8;29;30;31;32;33;34;35;36;37;38;39;40</prop> <prop type="user-defined">a lot of junk with letters and &quot +;90365AF9&quot</prop> <prop type="Guid::xxx">123456789</prop> <prop type="Att::xxx">name_of_someone</prop>^M <tuv xml:lang="en-US"><seg>a lot of junk with letters and &quo +t;90365AF9&quot<bpt i="1"></bpt>text<ept i="1">&lt;/cf&gt;</ept></seg +></tuv> <tuv xml:lang="en-US"><seg>a lot of junk with letters and &quo +t;90365AF9&quot<bpt i="1"></ept></seg></tuv> </tu>

Thanks a mil for helping me out. Really helps beginners to move on. Looking forward to your replies.

Kind regards C.

In reply to Re^2: help with regular expression required by PitifulProgrammer
in thread help with regular expression required by PitifulProgrammer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.