VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hi Cats,

    I need to find a string in a input.txt file

    Current Playback Device ID=2A99FA92-E624-4650-A032-DA719D9B03D5

    and replace it with:

    Current Playback Device ID=721D0FD1-DD46-11d0-8AAC-00A0C91D299F


    BUT consider that the replace have to be also in the case that the original string - in this case Current Playback Device ID=2A99FA92-E624-4650-A032-DA719D9B03D5 - contains different chatacters

    for example Current Playback Device ID=AAAAAAAA-E624-AAAA-A032-AAAAAAAAAAAA

    How can I do?
    thanks
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Strictly speaking, you cannot.

    But if I am correctly reading between the lines, you need to use the LEN() - length, and MID() - middle position, string functions.

    Scott
    Quote Quote  
  3. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Use regex. Search:
    Current Playback Device ID=[0-9A-F]{8}-E624-[0-9A-F]{4}-A032-[0-9A-F]{12}
    Replace:
    Current Playback Device ID=721D0FD1-DD46-11d0-8AAC-00A0C91D299F
    Last edited by JVRaines; 3rd Apr 2016 at 13:34. Reason: misread the OP
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    You can also use CMD's findstr which allows wild cards, place holders and many options. This can be used in a batch file as well for automating replacement.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!