Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I want to remove all words where not start with @ or #.
For example :
"I like to #eat McD.. #McD @McDonald"
The result:
"#eat #McD @McDonald"
Thanks,
Adam
Hi
Try this
if(WildMatch(ColumnName,'@*','#*')<>0,ColumnName,Null())
Remove Nulls in the option
Thanks
may be this
Data:
Load ID,Data, Concat(if(match(Left(Strings,1),'#','@'),Strings),' ') as FinalString
Group by ID,Data;
Load *,SubField(Data,' ') as Strings;
Load *, RowNo() as ID
Inline [
Data
"I like to #eat McD.. #McD @McDonald"
];
Try this,
LOAD
Orig,
Concat(Manipulated, ' ') as Manipulated
WHERE
WildMatch(Manipulated, '#*', '@*')
GROUP BY Orig
;
LOAD
Orig,
SubField(Orig, ' ') as Manipulated
Inline [
Orig
"I like to #eat McD.. #McD @McDonald"
"Let's go to #QlikWorld @PhoenixConventionCenter #Arizona"
];
Oh, I didn't see your answer before posting @Kushal_Chawda . It looks like we have quite similar aproaches.
It was smart of you to put some kind if ID to the row in case you have multiple rows with the exact same text content.
@Vegar what a coincidence
Hi @Kushal_Chawda @Vegar ,
Thanks for your answer and both can used.. i'll mark as answer the first one..
I've another problem.. Currently we used "space" (" ") as split, but some case i need to used "enter" to split it.. Can u
Ex:
You can expand your expression for creating the [Manipulated] field to this:
SubField( SubField(Orig, ' ') , chr(10) ) as Manipulated
//Chr(10) = Enter symbol
another option is to replace "enter" to "space"
subfield(replace(Data,chr(10), ' '),' ') as Strings