Greetings all you wise individuals, here is my question. If anyone has any idea how to do this in a simple way it would be great.

I am searching in files for lines that can look like:

-Version: 0.3 6-May-2002/Bill Buff -VERSION: 0.1 4-Jun-2001/Rita Ray -#Version 0.112 12-Apr-2002-Moon Man -*Version: 1.345 1-Jan-2002 Kay Koon -;Version 2.06 3-Feb-2002/Kobra -; VERSION 0.45 5-May-2002 Linus T - VERSION: 7-Oct-2002/Hade Roy - VERSION: Ola Ola 5.6.2002
I am only interested in finding those lines and changing them to format where everything else is skipped from line except the number:
-0.3 -0.1 -0.112 and so on.
I have not yet succeeded in making good general expression for my search, instead I am now searching for all types of name "Version" (#,spaces,;,*,infront of it) separately. All my "generalizations" just are not working.... =Problem 1

How to look for all these types of line with maybe one search expression if $line =~ m ???

Second problem, how do I then skip all the words and dates. Now I am subtituting everything (date, names) separately

If it clicks for you tell mee ,too Thanks Hewarn


In reply to Version history dilemma by hewarn

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.