Regular Expression(正規表現) Part17 (270レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

222: 2024/11/02(土)23:35 ID:5ILrPZJU(1) AAS
正規表現のオペレータの分類についての質問です
assertionにアンカーやバウンダリを含める分類はあまり見かけませんが何故でしょう?(例dotnet文書)

以下(多分regex界で著名な)参考サイトより引用
Assertions. The traditional regular expression metacharacters ^ and $ can be viewed as assertions about the text around them: ^ asserts that the previous character is a newline (or the beginning of the string), while $ asserts that the next character is a newline (or the end of the string). Perl added more assertions, like the word boundary \b, which asserts that the previous character is alphanumeric but the next is not, or vice versa.
外部リンク[html]:swtch.com

確かにマッチに含まれないという意味ではよくassertionであると言われるlookback/aheadと同様です
何か含めないことで利点があるのでしょうか?
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.036s