Advertisement
Guest User

Untitled

a guest
Jun 16th, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $text = '(ART)End Processing Autoroutines (12/06/15 15:50:47)'
  2.  
  3. # Regex = ^ Code:(.*?) Description:.* Timestamp:(.*?) $
  4. $regex = [regex]::Match($text, '^\((?<code>.*?)\)(?<description>.*)\((?<timestamp>.*?)\)$')
  5.  
  6. $regex.Groups['code'].Value               # ART
  7. $regex.Groups['description'].Value.Trim() # End Processing Autoroutines
  8. $regex.Groups['timestamp'].Value          # 12/06/15 15:50:47
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement