Extract a substring using PowerShell

前端 未结 8 998
灰色年华
灰色年华 2020-12-07 22:43

How can I extract a substring using PowerShell?

I have this string ...

\"-----start-------Hello World------end-------\"

I have to e

8条回答
  •  猫巷女王i
    2020-12-07 23:05

    other solution

    $template="-----start-------{Value:This is a test 123}------end-------"
    $text="-----start-------Hello World------end-------"
    
    $text | ConvertFrom-String -TemplateContent $template
    

提交回复
热议问题