Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends am facing one issue not understanding how to resolve
the thing is we are extracting data from share point every thing is fine but some fields contains HTML tags please fing attached file for clear information please help me out.
need very urgent
Thanks in Advance
Regards,
Vinod
Hi Angad Singh,
Thanks for your reply but the thing is in my Extractor i applied below logic
subfield(subfield((ows_Desc),'<div>',2),'</div>',1) as [Description]
subfield(subfield((ows_Impact),'<p>',2),'</p>',1) as Impact,
subfield(subfield((ows_Cause),'<div>',2),'</div>',1) as [Cause],
subfield(subfield((ows_Action),'<div>',2),'</div,>',1) as [Action],
subfield(subfield((ows_mplication),'<div>',2),'</div>',1) as [ Implication],
subfield(subfield((ows_Evidence),'<div>',2),'</div>',1)as Evidence]
after that values are coming like my attachment file is there any other way to remove all HTML tags at a time?
Hi Angad Singh,
Thanks for your reply but the thing is in my Extractor i applied below logic
subfield(subfield((ows_Desc),'<div>',2),'</div>',1) as [Description]
subfield(subfield((ows_Impact),'<p>',2),'</p>',1) as Impact,
subfield(subfield((ows_Cause),'<div>',2),'</div>',1) as [Cause],
subfield(subfield((ows_Action),'<div>',2),'</div,>',1) as [Action],
subfield(subfield((ows_mplication),'<div>',2),'</div>',1) as [ Implication],
subfield(subfield((ows_Evidence),'<div>',2),'</div>',1)as Evidence]
after that values are coming like my attachment file is there any other way to remove all HTML tags at a time?
You can do it with the help of VB script regular expression
Add the below function in Macro
Function RegExReplace(iString, sPattern, rPattern)
' Replaces any occurence of sPattern within the string iString with rPattern
' and returns the modified string, if no match is found the original string
' is returned
' iString: string, the input string to search and replace in
' sPattern: string, the pattern to search for
' rPattern: string, the pattern to replace the found pattern with
set RE = New RegExp
RE.Pattern = sPattern
RE.Global = True
RegExReplace = RE.Replace(iString, rPattern)
End Function
Use Load Statement as something like below
LOAD
RegExReplace(Description, '\<.*\>', '') AS Description
....
....
From Source;
You can actually create a mapping table and replace the fields with ''. I found the html special character list here:
degraeve.com/reference/specialcharacters.php
use this as Mapping Table and further clean your code.
Hope this was helpful.
Thanks,
Singh