@String Manipulation


#1

Hi Team,

I have content stored in string variable as shown below:

Item 10 Sched.line 1
Item 20 Sched.line 1
Item 30 Sched.line 1
Item 40
Net price must be greater than 0
Item 40 Sched.line 1
A different source of supply is the fixed source for this date
Item 50
Net price must be greater than 0
Item 50 Sched.line 1
A different source of supply is the fixed source for this date
Item 60
Net price must be greater than 0
Item 60 Sched.line 1
A different source of supply is the fixed source for this date
Item 70
Net price must be greater than 0
Item 70 Sched.line 1
A different source of supply is the fixed source for this date

I need to to extract the item number has error with error message in next till next item repeatedly, based on this I need to put the conditions to process the item.

Any hep on this?

Thanks
Girish


#2

Hi Girish,

Can you tell what is the expected output exactly ?

Thanks,
Hari


#3

Content one by one for each item after items but item number is not fixed


#4

split text with item as the delimiter


#5

You could try using a Regex pattern to extract the Matches.

I hope this sample helps.
Matches 1 uses itemPattern1 to extract the Item lines and Matches 2 uses itemPattern2

Regards.


#6

Thank you @ClaytonM