, 펄 문서에서
\A Match at only beginning of string
\Z Match at only end of string (or before newline at the end)
^ Match the beginning of the line
$ Match the end of the line (or before newline at the end)
, 펄 문서에서
\A Match at only beginning of string
\Z Match at only end of string (or before newline at the end)
^ Match the beginning of the line
$ Match the end of the line (or before newline at the end)
(I 표준 정규식에서 그들을 볼 수 없습니다 구문) :
"\ A"와 "\ Z"는 "^"및 "$"와 같지만 "/ m"한정자를 사용할 때 여러 번 일치하지 않는다는 점을 제외하고는 "^"및 "$"는 모든 내부 선 경계에서 일치합니다.
Perl과 관련이 있다면 (또는 PCRE, Perl 호환 정규 표현식을 사용하는 언어 또는 라이브러리) perl 태그를 추가해야합니다.
고마워. PCRE 태그 추가 및 추가 –
은 항상 줄 바꿈 후에 일치하며, 많은 방언이 ^
을 줄 시작 부분과 일치시킬 수 있습니다.
http://www.regular-expressions.info/reference.html ('앵커'를 찾으십시오.)
어떤 언어로 제공됩니까? re_format (7) 매뉴얼에'\ A' 또는'\ Z'에 대한 언급이 없습니다. – Kusalananda
물론 당신 말이 맞습니다. 내 초기 의심은 파이썬에서했지만 Perl 호환 정규 표현식을 구현하는 모듈을 가진 모든 언어에 적용됩니다 (파이썬 .re는 완전히 구현하지는 않지만) –