NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

public function run()
{
# $pattern = '/^[a-zA-Z0-9]+$/';
// var_dump(preg_match('/toi/', 'aitoilaai', $match)); # Mien sao cu chu "toi" trong string la true.
// var_dump(preg_match('/^toi$/', 'toi', $match)); # Bat dau va ket thuc string phai la chu "toi" => true.
// var_dump(preg_match('/^[A-Z]$/', 'x ', $match)); # Bat dau va ket thuc string phai la KHUON MAU tu "A-Z" | "a-z" | "0-9" => true.
// var_dump(preg_match('/^[a-z]{3,15}$/', 'haivu', $match)); # Bat dau va ket thuc string phai la KHUON MAU tu "A-Z" | "a-z" | "0-9" va do dai trong khoang 3 -15 ky tu => true.
// var_dump(preg_match('/^[a-z]{5}$/', 'haivu', $match)); # Bat dau va ket thuc string phai la KHUON MAU tu "A-Z" | "a-z" | "0-9" va do dai trong khoang 5 ky tu => true.
// var_dump(preg_match('/./', '@#@!$@$@!haivu%@', $match)); # Dai dien cho ky tu bat ky /./
// var_dump(preg_match('/[a-z]+/', '@#@csd!$aa@$@!haivu%@', $match)); # Kiểm tra xem trong chuỗi có tồn tại ít nhất một chữ số hay không?
// var_dump(preg_match('/[a-z]*/', '123ACjsaklj3j4l2k', $match)); # Kiểm tra xem chuỗi này có phải trống hoặc chỉ có số hay không?
// var_dump(preg_match('/d+/', '123', $match)); # đại diện cho chữ số bất kỳ (tương đương với [0-9])
# var_dump(preg_match('/d+/', '123', $match)); # đại diện cho chữ số bất kỳ (tương đương với [0-9])
// var_dump(preg_match('/D+/', '123', $match)); # đại diện cho phu dinh cua 1 chữ số bất kỳ (tương đương với [0-9])
// var_dump(preg_match('/s/', '123 1234', $match)); # kiểm tra xem chuỗi có khoảng trắng không? // -Ký tự khoảng trắng này bao gồm (space, tab, newline,)
// var_dump(preg_match('/S/', '123 1234', $match)); # PHU DINH cua s
// var_dump(preg_match('/@(.+)/', 'tran@hai@hien', $match)); # VD: Lấy tất cả các ký tự sau @ và trước dấu ,
// var_dump(preg_match('/@(.+),/', '[email protected],', $match, PREG_OFFSET_CAPTURE)); # VD: Cũng với ví dụ trên nhưng lần này mình sẽ trả về vị trí so khớp chuỗi cùng với kết quả sau khi so khớp bằng cách truyền thêm tham số thứ 4 vào.

var_dump(preg_match('/@(.+),/', '[email protected],', $match, PREG_OFFSET_CAPTURE,4)); # VD: Cũng với ví dụ trên nhưng lần này mình sẽ trả về vị trí so khớp chuỗi cùng với kết quả sau khi so khớp bằng cách truyền thêm tham số thứ 4 vào.
echo "<pre>";
print_r($match);
die;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.