Windows Logs: Ignore Spaces In Target Text?

Comments

3 comments

  • Avatar
    Rishi Divate

    Hi Mike, try this regex: 

    | parse regex "Target Account Name:[\s&&[^\r]]+(?<group\_name>[^\r]+?)\r"

    What you are doing here is making sure that you are capturing only those entries that have an actual group name (i.e. where the field is not blank) and then while capturing the group_name you make sure that you capture only the non-carriage return characters. Hope that helps, Rishi. 

     

    0
    Comment actions Permalink
  • Avatar
    Kumar Saurabh

    Another thing I would try is replacing + after the first \s by a *, because + requires at least one empty space to be there. * on the other hand will match zero or more spaces.

    0
    Comment actions Permalink
  • Avatar
    Michael Bretzke

    Thank you Rishi and Kumar for your suggestions.  After testing, it looks like Rishi's syntax did the trick and populated this field as expected.  Thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.