I have multiple records and I want to match specific strings and at the same time unmatched specific strings. I came up with one pattern but it matches all. Anyone can revise the pattern please?
Pattern: /PF\s*(?:XAP|FNI)?\s*O\/\s*(?:RG|VO|HS).*\s*\+?(?!HSAC|VOG)/gm
Here are the records-
Here are the records should be matched:
PF O/ HSAC + / RGETK
PFO/RGETK
PFO/RGETK+/RGETK
PFO/VOG+/RGETK
PFO/VOG+/VOG
PFO/RGETK+/VOG
PFXAPO/RGETK
PFXAPO/RGETK+/RGETK
PFXAPO/VOG+/RGETK
PFXAPO/VOG+/VOG
PFXAPO/RGETK+/VOG
PFFNIO/RGETK
PFFNIO/RGETK+/RGETK
PFFNIO/VOG+/RGETK
PFFNIO/VOG+/VOG
PFFNIO/RGETK+/VOG
PF O/RGETK+/HSAC
PF O/HSAC+/RGETK
PF O/RG+/RGETK
PF O/RG+/HSAC
Here are the records should NOT be matched:
PFO/VOG
PFO/VOG+/HSAC
PFO/HSAC+/HSAC
PFXAPO/VOG
PFXAPO/VOG+/HSAC
PFXAPO/HSAC+/HSAC
PFFNIO/VOG
PFFNIO/VOG+/HSAC
PFFNIO/HSAC+/HSAC
PF O/ HSAC
PF XAP O/HSAC
PFFNI O/ HSAC
PFO/VOG,PFO/VOG+/HSAC, etc.) shouldn't be included in the final result? What is the rule for them? They start fromPand end withC? And so on. Or what is the rule to include some string in the result?