JavaScript Regular Expression for UK Postcode that allows no space
I've been using this regular expression for validating UK postcodes in my contact forms and it works fine, however I now need it to be modified to validate with or without a space e.g. GL50 1HX or GL501HX

Is there an easy solution to this?
JavaScript Regular Expression for UK Postcode that allows no space
===

I've been using this regular expression for validating UK postcodes in my contact forms and it works fine, however I now need it to be modified to validate with or without a space e.g. GL50 1HX or GL501HX

Is there an easy solution to this?