I am struggling to identify whether a string contains "=" or "|" between delimiters (?<=P_MFG_PART_NUM\=) and (?=\|P|$).
I am able to match all characters using this (?<=P_MFG_PART_NUM\=)(.*?)(?=\|P|$). Not sure how to check if the inside string has just "=" or "|".
A typical string will look like the below and I am trying to identify the = or |. The start of the match string should be "P_MFG_PART_NUM=" and end can be "|P" or end of line
X_MFG_PART_NUM=|X_MANUFACTURER_ID=|X_ORGANIZATION_ID=|X_INVENTORY_ITEM_ID=|X_RETURN_STATUS=Validation failed|P_MFG_PART_NUM=HEX, 1/2-13 X 4 IN THD = NC TP316-SS, ASTM A312|Psdfsdfs
The regex will be executed in .net.
Any help on this is highly appreciated.
Thanks