Count occurrences of String in field [message #668468] |
Mon, 26 February 2018 15:29 |
rajivn786
Messages: 161 Registered: January 2010
|
Senior Member |
|
|
Hi,
I need count the occurrences of male and female in string, but I am getting incorrect results for male as it's counting female as well due to "male" string in word female.
Select REGEXP_COUNT(' 67 y.o. male PMHx stated below presenting for followup of HTN. Patient seen for annual exam, dx with HTN. Started on lisinopril, tolerating well and female sex partner', 'male') from dual
Instead of getting output as 1 , I am getting 2.
Actually we have clob field, but I just trimmed it to fit here.
|
|
|
|
|