5 Replies Latest reply on Feb 13, 2014 3:59 AM by Matt_Crook

    Grep command to achieve the following - Almost got it

    Matt_Crook

      Hi

       

      I have been on here before and received great help with grep styles but have one that I can't find a solution for from online resources

       

      I am using the following grep command to add a descriptor to a event.

       

      My text looks like this

       

      9.00     Football

       

      Grep command is

       

      (\d+\.\d+\t)(Football)(.*\r.+\r)

       

      $1$2$3Play football.\r

       

      Which acheives...

       

       

      9.00     Football

                  Play football

       

       

       

      Problem is

       

      Some of the titles are

       

      9.00   Sunday Football

       

      9.00   Junior Football

       

      9.00   Junior 5 a side Football

       

       

      I ideally need a grep command that will do exactly the same but ignore Sunday, Junior, Junior 5 a side (but leave it in) I can't add extra greps as there are too many

       

      Is there a command that will find the digits (ignore everthing until football) and add the descriptor

       

      Hopefuly it is just a little addition to the grep but I can't find a solution

       

      Any help much appreciated