Pase keywords in text string

  • I've been trying to find an example to parse a record that looks for a Beginning keyword then based on that finds another keyword on the same line then pulls the next x  values that are quoted.

    example:

    $data = @" this is a sample cstsums record with Values('xxxx','ppppp','45gheeet','pperere')

    $data = @" this is a sample cstdetails record with Values('xxxx','ppppp','45gheeet','pperere')

    output table   expected and columns(headers)

    tbl                 Value1 Value2       Value3       Value4

    cstsums        xxxx      ppppp    45gheeet

    cstdetails      xxxx      ppppp    45gheeet      pperere

    If the record contains cstsums I want the first 3 quoted fields after the word Values. If it's a cstdetails on the record I want the first 4 quoted fields after word values.

    Thanks.

     

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply