Parse a specific string start and stop position?

Comments

2 comments

  • Avatar
    David Woller

    Hi Bill,

    I was able to put together the following regex to parse the message that you specified above.

    The regex statement below will count out 22 non-carriage return characters from the start of the string and then begin parsing the start of the "msg" field. This field will match any non-carriage return characters from the 23rd character to the colon, and will extract this text as a named value called "msg". If you want to extract the text after the colon into its own named field then that can be accomplished by putting in another similar named field, I can help with that as well if you'd like.

    I hope this helps, please let me know if you have any questions.

    ^[^\r]{22}(?<msg>[^\r]*?):
    0
    Comment actions Permalink
  • Avatar
    Bill Becotte

    Hi David, 

    Thank you VERY much, this totally helped and worked!

     

    1
    Comment actions Permalink

Please sign in to leave a comment.