Validation :
String needs to validate
String validationStr= " hitCount=2&&HeadlineText= BRIEF-NanHua Bio-medicine Notes Unusual Price Movement In Shares Of Company ||RCS=G:1|E:5|G:2EK|R:SBRY.L||PermIDs=4295895145|4295890710";
Above things needs to validate in below String data
String valStr2 =" {hitCount=[2671], RCS=[B:126 E:6 B:125 G:6 DEE:1 B:260 A:C B:96 C:D R:[login to view URL] B:92 M:1QD E:4V E:K G:K A:T A:U E:R G:S P:4295865629 E:5A G:B1 B:259 E:5C E:W B:69 B:255 B:86 G:3H B:130 M:Z L:en A:1 A:2 B:1460 A:6 E:1 M:1P2 G:1, A:9 E:6 E:5 G:6 B:38 B:35 DEE:1 B:34 E:4J C:D M:1QD E:J R:[login to view URL] G:K E:R B:1175 B:236 E:5A B:235 G:S G:B1 B:237 E:W B:234 G:3H B:41 M:Z P:4295864699 L:en E:1 A:6 G:1], HeadlineText=[BRIEF-NanHua Bio-medicine Notes Unusual Price Movement In Shares Of Company, BRIEF-Guizhou Changzheng Tiancheng To Sell Electric Unit For 398.0 Mln Yuan], PermIDs=[, 4295864699,,,5000058303]}";
NOTE : && operator means AND, || operator means OR single | means OR
Explanation : testcase will pass when below condition will be true
1. hitCount=2 there should be there should be 2 HeadlineText or 2 RCS values
2. there should be "HeadlineText=REG - D E Shaw ; Co LP Sainsbury (J) PLC Home Retail Grp Plc - Form 8.3 - J Sainsbury Plc" OR in RCS field the G:1 OR E:5 OR G:2EK OR R:SBRY.L words should be there OR in PermIDs fields the 4295895145 OR 4295890710 should ne exist then condition will true.
so we'll pass the validationStr and valStr2 Strings in method then it should give true or false in return
and in validationStr string the HeadlineText or RCS and PermIDs can be anything like we can have sometime HeadlineText or RCS or PermIDs OR new fileds like Langauge fields we can have so all things should be dynamic validation Tags and validation text
and It should be print like this :
OUTPUT
1. 2 Records are exist
2. The Headline Text does not exist BUT G:1 Exist in both records
then same for all if any words exist in OR condition then the final result will be true
Please let me know if any doubts.
Needs Highly expert and we needs till tomorrow morning.
thanks
we can be summed up by a firm who can achieve anything we puts our mind up to, having months of freelancing in Android Domain, always staying updated is one of our Idiosyncrasies followed by a desperate mode of state to know something until it bothers our mind, oh! Apart from this, we are great at Management and love solving problems with programming.