I need some help on a problem that is driving me nuts!
I have a database that is returning Medications for a pharmacy. The $Brand_Name variable is what is linked to this info. Inside some of the $Brand_Name variables is the text (without the quotes) " - Generic (This is the generic drug name)"
I can retrieve the $Brand_Name no problem, but have not yet been able to figure out how to get just what is in the parenthesis and after - Generic, as some on the Brand_Name variables also contain parenthesis that are not Generics.
Basically it's like this :
$Brand_Name="Aventyl - Generic (Nortriptyline Hcl)(Apo)";
All I want is the "Nortriptyline Hcl"
Please remember that the - Generic ( will not always be right after the Brand name of the drug, it may be at the end of the line, but still within the $Brand_Name variable.
How can I do it?
Thanks in Advance..
Mike