The Cart.php under system/library has a regex pattern definition that is not enabling me to use Arabic for name values. This works:

```
$data = array(
  'id' => "221212",
  'qty' => 1,
  'price' => 21.2,
  'name' => 'dasdasdas'
);

```

But this fails because of Arabic in the name:

```
$data = array(
  'id' => "221212",
  'qty' => 1,
  'price' => 21.2,
  'name' => 'عمر'
);

```

Now in the Cart.php class, I found the following:

```
// These are the regular expression rules that we use to validate the product ID and product name
  var $product_id_rules = '\.a-z0-9_-';
  // alpha-numeric, dashes, underscores, or periods
  var $product_name_rules = '\.\:\-_a-z0-9';
  // alphanumeric, dashes, underscores, colons or periods

```

I am concerned with the name rules. Clearly this is the problem because later on there is a check:

```
if ( ! preg_match("/^[".$this->product_name_rules."]+$/i", $items['name'])) {
  log_message('error', 'An invalid name was submitted as the product name: '.$items['name'].' The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces');
  return FALSE;
}

```

How can I replace the name rules string to work with Arabic? I have a very poor background with regex, so please help out. 

Thanks! 

![enter image description here](https://i.stack.imgur.com/uJrzn.png)