Remove - replace URL in threads.note
Hi,
I'm working on a custom report that includes the threads.note field. Here’s a sample of how the conversation looks in that field:
Agent: Hi how may I help you?
Anonymous: Hi my problem is in this link https://d111111.example.net/ksnakjdnlDKSAMD234jnda can you help me?
Agent: https://community.oracle.com/ may help you.
Anonymous: Thanks.
My report columns are defined as follows:
Account Id : $account_id |
---|
Account Name : contacts.full_name |
Description : threads.note |
Description - Link Removed : IF( INSTR(TO_CHAR(threads.note), 'http') > 0, CONCAT( SUBSTR(TO_CHAR(threads.note), 1, INSTR(TO_CHAR(threads.note), 'http') - 1), '[LINK]', SUBSTR( TO_CHAR(threads.note), INSTR(TO_CHAR(threads.note), 'http') + INSTR( SUBSTR(TO_CHAR(threads.note), INSTR(TO_CHAR(threads.note), 'http')), ' ' ) ) ), TO_CHAR(threads.note)) |