locked
[SOLVED] How to code this powershell? RRS feed

  • Question

  • I would like to know on how to add string into following coding, which is wrong statement.

    $sample=[regex]::Matches($fileContent,'sample_string(.*?)"')
      "Tesing : " + $sample[$i].Groups[1].Value | Add-Content C:\tempfile.txt

    Does anyone have any suggestions?
    Thanks in advance for any suggestions


    Thanks in advance for any suggestions


    • Edited by oemMicrosoft Friday, January 26, 2018 12:35 PM
    • Moved by Bill_Stewart Friday, January 26, 2018 2:37 PM Unanswerable/help vampire
    Thursday, January 25, 2018 9:09 PM

All replies

  • No idea what you are asking.  What is not working?  What are the errors?

    Please try to be clear.


    \_(ツ)_/

    Thursday, January 25, 2018 9:20 PM
  • Solved

    Thank you


    Thanks in advance for any suggestions

    Friday, January 26, 2018 12:35 PM