หน้า 1 จากทั้งหมด 1

อยากทราบวิธีเขียน Pattern preg_match_all มันเขียนยังไง

โพสต์แล้ว: 03/11/2016 11:19 am
โดย thatsawan
อยากทราบวิธีเขียน Pattern preg_match_all มันเขียนยังไง ตอนนี้ ต้องการเขียน ให้ค้นหาคำภาษาไทย ตัวเลข เเละ อักษรภาษาอังกฤษ บลาๆ เเต่ไม่รู้วิธีเขียน Pattern

Re: อยากทราบวิธีเขียน Pattern preg_match_all มันเขียนยังไง

โพสต์แล้ว: 03/11/2016 11:56 am
โดย mindphp

Re: อยากทราบวิธีเขียน Pattern preg_match_all มันเขียนยังไง

โพสต์แล้ว: 04/11/2016 10:48 am
โดย tsukasaz
Simple regex

Regex quick reference
[abc] A single character: a, b or c
[^abc] Any single character but a, b, or c
[a-z] Any single character in the range a-z
[a-zA-Z] Any single character in the range a-z or A-Z
^ Start of line
$ End of line
\A Start of string
\z End of string
. Any single character
\s Any whitespace character
\S Any non-whitespace character
\d Any digit
\D Any non-digit
\w Any word character (letter, number, underscore)
\W Any non-word character
\b Any word boundary character
(...) Capture everything enclosed
(a|b) a or b
a? Zero or one of a
a* Zero or more of a
a+ One or more of a
a{3} Exactly 3 of a
a{3,} 3 or more of a
a{3,6} Between 3 and 6 of a

ที่มา http://php.net/manual/en/function.preg-match.php

Re: อยากทราบวิธีเขียน Pattern preg_match_all มันเขียนยังไง

โพสต์แล้ว: 27/07/2022 4:10 am
โดย บุคคลทั่วไป
ปัญหาโลกแตกมาฟังก๋ชั่นนี้ตอนอัพเกรดเวอร์ชั่นแทนจะรื้อเขียนใหม่เลย