Jump to content
Larry Ullman's Book Forums

enxaneta

Members
  • Posts

    1
  • Joined

  • Last visited

enxaneta's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi everybody, I’m not very good with regex, and I live in Catalunya ( a language full with diacritics). An address here may look like this: Carrer d’Antoni Toldrà s/n 1º,2ª. For the checkout.php I’ve rewritten Larry’s code like so: if (preg_match ("/^[0-9'.,\/\p{L}_\s]{5,100}$/u", $_POST['address'])) { $address = addslashes($_POST['address']); } else { $reg_errors['address'] = 'Sisplau, introdueixi una adreça d'enviament!'; } Although this will work in my computer (PC, PHP 5.3.1) it will fail when I’m going life (LINUX, PHP 5.2.17) Is it anybody there able to tell me what is wrong with my regex?
×
×
  • Create New...