Tìm các khoảng trống trong đoạn văn bản :
Regex : {2,}
Hello, my name is Ben Forta, and I am
the author of books on SQL, ColdFusion, WAP,
Windows 2000, and other subjects.
--> Sử dụng () để nhóm lại
Regex : ( 
{2,}
Hello, my name is Ben Forta, and I am
the author of books on SQL, ColdFusion, WAP,
Windows 2000, and other subjects.
- Dấu hoăc |
Ví dụ muốn tìm năm từ 1900-nay trong đoạn văn bản
Regex : 19|20\d{2}
ID: 042
SEX: M
DOB: 1967-08-17
Status: Active
Sai -->đúng :
Regex : (19|20)\d{2}
ID: 042
SEX: M
DOB: 1967-08-17
Status: Active