[regex] PHP 정규표현식 패턴 23강 - \B (역슬래시 대문자B) : 워드(단어)의 경계가 아닌 것
1,085
패턴 23 - \B : 워드(단어)의 경계가 아닌 지점
Source
|Ere| |iron| |was| |found| |or| |tree| |was| |hewn|,
|
Case 1 - 앞에 단어 경계선 아닌 것이 위치하는 어떤 문자
Regular Expression: |
\B. |
---|
First match: |
Ere iron was found or tree was hewn, |
---|
All matches: |
Ere iron was found or tree was hewn, |
---|
Case 2 - 뒤에 단어의 경계선 아닌 것이 위치하는 어떤 문자
Regular Expression: |
.\B |
---|
First match: |
Ere iron was found or tree was hewn, |
---|
All matches: |
Ere iron was found or tree was hewn, |
---|
|