+ Start a Discussion
SS KarthickSS Karthick 

Extract text from Rich Text area field

Hi folks,
        Can tell me how to extract the text from rich text area field if it contanis html tag anf image


Please Help!
Best Answer chosen by SS Karthick
Alex TennantAlex Tennant
You should be able to use the following line of code to replace all of the HTML tags in your Rich Text Area with blank strings, is that what you want?
String.replaceAll('\\<.*?\\>', '');
The String.replaceAll(...) method is documented here (http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm#apex_System_String_replaceAll).