Monday, October 19, 2015

My Name in Regex!

^([\+?I?])([\+?n?])([\+?d?])([\+?e?])([\+?r?])([\+?a?])(\d{0,9})$

Useful websites to learn Regex

Basic Tutorial
  1. http://www.macronimous.com/resources/writing-regular-expression-with-php.asp
Regex Website Tester
  1. https://regex101.com/

Regex to Valid Phone Number (Malaysia)

     function valid_phone_num($str)
     {
     if (!preg_match("/^(\+?6?01)[0|1|2|3|4|6|7|8|9]\-*[0-9]{7,8}$/", $str)):
       $this->form_validation->set_message('valid_phone_num', 'Please insert a valid phone number format. Example : 0191234567.');
       return FALSE;
     else:
       return TRUE;
    endif;
    }

Wednesday, October 14, 2015

Codeginter RollBack

https://ellislab.com/codeigniter/user-guide/database/transactions.html

Wednesday, October 7, 2015

WebcamJS

https://github.com/jhuckaby/webcamjs