/* The most "sophisticated" programmatic way to approach this would be to load in the REGEX modules, but this requires module usage
once you activate those though, that should allow leveraging character classes (i.e. isolate punctuation, alphanumerics, etc..)
Without REGEX, then there are other approaches, but PurgeChar/KeepChar can definitely complete the task */
Set vKeepString = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789;
LOAD PurgeChar(ScrubField,'$(vKeepString)') AS ISOLATE_OUTLIER_CHARS RESIDENT MyUnfilteredInput;
another solution might be:
mapPurgeNumLett: Mapping LOAD Chr(RecNo()), '' AutoGenerate 65535 Where IsNum(Chr(RecNo())) or Upper(Chr(RecNo())) <> Lower(Chr(RecNo())); table1: LOAD *, MapSubString('mapPurgeNumLett',[First Name]) as [First Name Out] Inline [ First Name André234%&/ Zoë§$ Seán()? Sørina*# ____________ Ajay Ajay123$ Ajay$$$ Ajay#$% Ajay@ $$$ $ % & * @ ^^^^^^^ ---------- !!!!!!! André234%&/ Zoë§$ Seán()? Sørina*# ];
hope this helps
QlikCommunity_Thread_284807.qvw 150.5 K
Thanks for your response.
Your solution will work when the requirement is ANY SPECIAL CHARACTERS.
My requirement is to identify ONLY SPECIAL CHARACTERS. i.e., User enters the First name as only special characters like $,&,---,*** etc. These kind of entry needs to be flagged.
So, First name -----Text along with special characters eg : Ajay$&* or Vijay#@ is valid.
So, in your above example, Andre,Zoe,Sorina,Ajay etc are all valid entries.
Only the one with special characters to be flagged like $$$,%,*,@,^^^^^^ etc.
Hope you got my requirement.
Awaiting some solution, :-(
Let me see if I get this whole "ambush" straight. Vinay posts a list of inputs that look like Ascii, but the riddle is that his alphanumerics lie north of chr(127) and are into Unicode territory (this had better be a surprise to Vinay, otherwise that was an important detail to omit).
Marco then recognizes this and uses it to show off a technique that will scan the Qv11.2 range of Unicode, under the premise any character that doesn't have both upper & lower is a flagged symbol, so long as it isn't a number.
Which reminds me.. since Qlikview is .net, when can we get regex out of the box?
Thanks!!!!! your solution works and was able to achieve the desired output. Thanks a ton.
@Shoham, Thanks for the suggestion, and it helped me by comparing the length. and you are right about it ,if length has not changed, then it is special character, else it has valid character.
Thanks Anil and Evam for your responses as well.