I'm aware of using various functions like CHARINDEX and PATINDEX, but only for a single "spot" in a string. What I'm needing to do is parse out the characters of a string that exist between a < and >. For example:
<ul><li>Good afternoon,<br /><br />Please see the NDC number listed on the attached delivery ticket.<br /><br />Best regards,<br /><br />Rebecca Lawrence<br />Clinical Pharmacist<br /> <br /> <br /><br />From: Merino,Jason L <JLMerino@email.com> <br />Sent: Monday, September 12, 2022 1:17 PM<br />To: YYY <Pharmacy@email.com><br />Subject: NDC number<br /><br /><br />Hello! Could I please get the NDC number for Lewis Trantham's ID number 24628 medication? I just received it and it is not listed. <br /> <br /> <br />Thank you!<br />Jason Merino<br />Office Coordinator<br />Specialty Clinic of City<br />(555) 555-5555</li></ul>
So it could be <br>, <br />, <[email_address]>, etc. Given the range of possibility of text that could exist here, I have no idea how to go about removing these bits of characters. As stated, I'm only aware of how to do this when the string is much more predictable. And this is stored as a VARCHAR by the way.