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.