Payment of Import Bill is 56$ to DEF party and Payment of Import Bill is 67$ to IJK Party
Now what I want to do is write a regex pattern which will recognize the text as type A if the words “Payment of Import Bill” all 4 are in continuation and in order appear once
Same If the words “Payment of Import Bill” all 4 are in continuation and in order appear twice the regex should recognize the text as type B
So in the above 2 example statements the first statement should be detected as type A and the second statement should be detected as type B
Str.Split({"Payment of Import Bill"},StringSplitoptions.None).Count
This will always give the count as +1 …so always from result you have to remove 1 to get the count…Basically it counts the number of splits happened which will be plus one of the split keyword