正在从我的代码中删除\ - preg_replace('/ \ s + /','',$ postcode); 在wordpress

I'm using wordpress for my main site and I'm attempting to run some code, it should be really simple... I need to remove to strip an input to just characters with no spaces etc...

I'm attempting to use:

$postcode = preg_replace('/\s+/', '', $postcode);

however for some reason when I click save in the php plugin I'm using it becomes:

$postcode = preg_replace('/s+/', '', $postcode);

Is there any reason that a \ would be getting removed?

My site is wordpress and the plugin is Custom-CSS-JS-PHP

Please ignore this question - I've just checked the wordpress database and the full string is in there, so clearly there is something that stops the \ displaying on the edit page.