Regular Expression(正規表現) Part17 (277レス)
上
下
前
次
1-
新
222
: 2024/11/02(土)23:35
ID:5ILrPZJU(1)
AA×
外部リンク[html]:swtch.com
[240|
320
|
480
|
600
|
100%
|
JPG
|
べ
|
レス栞
|
レス消
]
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
正規表現のオペレータの分類についての質問です にアンカーやバウンダリを含める分類はあまり見かけませんが何故でしょう?例文書 以下多分界で著名な参考サイトより引用 確かにマッチに含まれないという意味ではよくであると言われると同様です 何か含めないことで利点があるのでしょうか?
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 55 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
ぬこの手
ぬこTOP
0.030s