![]() |
|
Non-alphanumeric - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: PHP (https://sinister.li/Forum-PHP) +--- Thread: Non-alphanumeric (/Thread-Non-alphanumeric) |
Non-alphanumeric - Kawa - 04-19-2019 Does anyone here knows to decode PHP non-aplhanumeric? I'm trying to understand it, anyone ? Thanks. RE: Non-alphanumeric - mothered - 04-19-2019 Please provide the code you wish to decode. RE: Non-alphanumeric - Kawa - 04-19-2019 I do realize its a little bit hard to do without the code....I don't feel quite comfy by sharing it...., IM not supposed to. is it possible to get a brief explanation on the method to decode? by the way... I sent you a pm. RE: Non-alphanumeric - Kawa - 04-19-2019 (04-19-2019, 04:15 AM)mothered Wrote: Please provide the code you wish to decode. I do realize its a little bit hard to do without the code....I don't feel quite comfy by sharing it...., IM not supposed to. is it possible to get a brief explanation on the method to decode? by the way... I sent you a pm. RE: Non-alphanumeric - mothered - 04-19-2019 (04-19-2019, 05:35 AM)Kawa Wrote:(04-19-2019, 04:15 AM)mothered Wrote: Please provide the code you wish to decode. If you don't wish to share the code, I fully understand. When you say "decode", are you referring to "removing" all non-alphanumeric characters? If so, use the following code. Code: <?php
$string="Sinisterly!!?*&";
$string = preg_replace( '/[\W]/', '', $string);
echo($string);
?>
Output: SinisterlyThe regular expression of ‘/[\W]/’ replaces every non-alphanumeric character with an empty string. The preg_replace() function, searches for the strings. RE: Non-alphanumeric - Kawa - 04-22-2019 (04-19-2019, 11:58 AM)mothered Wrote:(04-19-2019, 05:35 AM)Kawa Wrote:(04-19-2019, 04:15 AM)mothered Wrote: Please provide the code you wish to decode. I'm afraid... that's not what I mean.... PHP non-alphanumeric is actually an advanced way to obfuscate your code....... maybe this could light some concepts and hopefully someone can understand it better than me http://www.thespanner.co.uk/2011/09/22/non-alphanumeric-code-in-php/ |