Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
i wrote a function which can pick out abbreviation word from develloped one.
but in some cases it doesn't work .
for exemple the script tell me 'ok' that the Word ' a b c d ' is an abbreviation
but the world 's o s NDD' in fact is an abbreviation , but the program tell me it's not.
the code bellow:
Sub FilterAbbr(String)
let nbreMots= SubStringCount(String,' ')+1;
For i=1 to $(nbreMots)
let mot$(i)=SubField(String,' ',$(i));
IF WildMatch('$(mot$(i))','1','2','3','4','5','6','7','8','9','A','Z','E','R','T','Y','U','I','O','P','Q','S','D','F','G','H','J','K','L','M','W','X','C','V','B','N') then
LET vText = vText &' '& '$(mot$(i))';
Let vMsg = 'ok';
ELSE
LET vText = vText &' '& '$(mot$(i))';
Let vMsg = 'ko';
ENDIF
NEXT
End Sub;
thank you for yourHelp
Here is The Solution 😄
Sub FilterAbbr(String)
Let vText='' ;
Let vMsg ='';
let nbreMots= SubStringCount(String,' ')+1;
For i=1 to $(nbreMots)
let mot$(i)=SubField(String,' ',$(i));
IF WildMatch('$(mot$(i))','1','2','3','4','5','6','7','8','9','A','Z','E','R','T','Y','U','I','O','P','Q','S','D','F','G','H','J','K','L','M','W','X','C','V','B','N') then
LET vText = vText &' '& '$(mot$(i))';
Let vMsg = 'abbr';
EXIT For;
ELSE
LET vText = vText &' '& '$(mot$(i))';
Let vMsg = 'dev';
ENDIF
NEXT
End Sub;
I guess NDD is something you are not checking in your WildMatch function
WildMatch('$(mot$(i))','1','2','3','4','5','6','7','8','9','A','Z','E','R','T','Y','U','I','O','P','Q','S','D','F','G','H','J','K','L','M','W','X','C','V','B','N', 'NDD')
yes i agree but it's just an exemple i have more than 400 000 lines , maybe i have 20 000 of this exemple !
But how do you differentiate between an abbr. and everything else?
this is was the main quest . but i found it i'll share the src code 😄 thanks to you
Ayoub, do not forget to post your solution, once you do, be sure to use the Accept as Solution button to mark it as the solution as well...
Regards,
Brett
Here is The Solution 😄
Sub FilterAbbr(String)
Let vText='' ;
Let vMsg ='';
let nbreMots= SubStringCount(String,' ')+1;
For i=1 to $(nbreMots)
let mot$(i)=SubField(String,' ',$(i));
IF WildMatch('$(mot$(i))','1','2','3','4','5','6','7','8','9','A','Z','E','R','T','Y','U','I','O','P','Q','S','D','F','G','H','J','K','L','M','W','X','C','V','B','N') then
LET vText = vText &' '& '$(mot$(i))';
Let vMsg = 'abbr';
EXIT For;
ELSE
LET vText = vText &' '& '$(mot$(i))';
Let vMsg = 'dev';
ENDIF
NEXT
End Sub;