Regular Expression(正規表現) Part17 (270レス)
Regular Expression(正規表現) Part17 http://mevius.5ch.net/test/read.cgi/tech/1702684760/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
222: デフォルトの名無しさん [sage] 2024/11/02(土) 23:35:42.52 ID:5ILrPZJU 正規表現のオペレータの分類についての質問です 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. https://swtch.com/%7Ersc/regexp/regexp1.html 確かにマッチに含まれないという意味ではよくassertionであると言われるlookback/aheadと同様です 何か含めないことで利点があるのでしょうか? http://mevius.5ch.net/test/read.cgi/tech/1702684760/222
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.752s*