Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can any one please help me on below requirement.
I have a Description field like below.But it contains some HTML special characters.
Please help me to remove those HTML special characters and Please help me to get the below Expected Description field
Description
<p>A code that identified by it's financial type.</p>
<span>The date was no longer be used.</span>
<p>A <span>Drive to identifies a customer.</span></p>
<p><span style="font-size: 12.0px;">The Number of subsidiaries recorded.</span></p>
Expected Description
A code that identified by it's financial type.
The date was no longer be used.
A Drive to identifies a customer.
The Number of subsidiaries recorded.
Thanks in advance
You'll need to implement a function which can parse the input strings for stripping html tags.
Have a look at following:
Hello,
You may use TextBetween function:
Regards,
Hi @naumanshah
Thanks for your reply.
I am not able to understand how to use below function .
Hi,
One way is to loop through each row and remove all pieces of text wrapped between '<' and '>' . See the sample script below:
// Load original data
Description_Temp:
LOAD ID, Name, Description
FROM [$(vG.LoadPath)Description.qvd] (qvd);
Description:
Load * INLINE [ID, Description_Clean];
//Loop through each row in the qvd file
For i=0 to NoOfRows('Description_Temp')-1
Let vID = Peek('ID', $(i),'Description_Temp');
Let vDescription = Peek('Description', $(i),'Description_Temp');
vTagCount = SubStringCount('$(vDescription)','<');
// Identify and remove text between <...> until no <tag> left
Do While vTagCount>0
vTag = '<' & TextBetween('$(vDescription)','<','>',1) & '>';
vDescription = Replace('$(vDescription)','$(vTag)','');
vTagCount = SubStringCount('$(vDescription)','<');
Loop;
Load * INLINE [
ID, Description_Clean
"$(vID)","$(vDescription)"](txt, msq);
Next i;
Left Join(Description) LOAD ID, Name Resident Description_Temp;
DROP TABLE Description_Temp;
Hope this helps!
BR,
Vu Nguyen