I am trying to find some patterns. they can be:
1. "fourty|40;TOFIND|1234;fifty|50"
2. "TOFIND|1234;fifty|50"
3. "fourty|40;TOFIND|1234"
as you can see, the TOFIND|1234 can appear inside the statement (before ; and after ;), or it can have only before ; or it can have none.
It should NOT include examples:
MTOFIND|1234;
;TOFIND|1234Q
How can I find it?
I tried: Regex re = new Regex("TOFIND|1234" + "[;?]");
But I am not sure its correct.
Please help!
Thanks