Link to home
Start Free TrialLog in
Avatar of bibi92
bibi92Flag for France

asked on

get string on several files contains [

Hello,
$path = "c:\Logs"  
$Searchstring = 'Return Code' -match '^Return Code[0'


$Logs = Get-ChildItem -path $path -recurse -include *.log  

 
parsing "^Return Code[0" - Unterminated [] set.
At line:1 char:1
+ $Searchstring = 'Return Code' -match '^Return Code[0'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException

How to resolve ?

Thank you  




ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial