Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a list of Input first names like below
First Name:
Ajay
Ajay123$
Ajay$$$
Ajay#$%
Ajay@
$$$
$
%
&
*
@
^^^^^^^
----------
!!!!!!!
I need to pull only special characters. Even though other names has text with special character it should not display.
In this case, it should have the output as below
DESIRED OUTPUT:
First Name
$$$
$
%
&
*
@
^^^^^^^^^
-------------
!!!!!!!
I have tried to use Purgechar and Keepchar functions. In both cases, it will even list out the names which has text along with special characters.
Thanks,
Vinay
Glad it helped
Marco
Ok, went and tried Vinays original example using his sample data and it doesn't appear like there's any data above chr(127). i.e. "no Unicode that looks like it's ascii, but isn't, a la chr(65): 'A' being a different character than chr(1040): 'А'
However Marco introduces the concept of characters above chr(127) and beyond the ascii 255 line, expanding his example to include Unicode.
Vinny can mark what he prefers (and Marco puts up plenty of fine solutions), but there's no reason Purgechar() wouldn't be suitable here so long as the original premise was lower ascii character sets. Don't want to perpetuate fallacy.
And as mentioned, Regex could work:
[^[:punct:]\x0A\x0D]