SELECT * FROM mytable WHERE mycolumn REGEXP "[[:<:]][0-9]{1,3}\\.([0-9]{1,3}.?){3}((\\/)?[^ ]*)?[[:>:]]";
[[:<:]][0-9]{1,3}\.([0-9]{1,3}.?){3}((\/)?[^ ]*)?[[:>:]]
Assert position at the beginning of a word (position followed by but not preceded by an ASCII letter, digit, or underscore) «[[:<:]]»
Match a single character in the range between 「0」 and 「9」 «[0-9]{1,3}»
Between one and 3 times, as few or as many times as needed to find the longest match in combination with the other quantifiers or alternatives «{1,3}»
Match the character 「.」 literally «\.»
Match the regex below and capture its match into backreference number 1 «([0-9]{1,3}.?){3}»
Exactly 3 times «{3}»
You repeated the capturing group itself. The group will capture only the last iteration. Put a capturing group around the repeated group to capture all iterations. «{3}»
Match a single character in the range between 「0」 and 「9」 «[0-9]{1,3}»
Between one and 3 times, as few or as many times as needed to find the longest match in combination with the other quantifiers or alternatives «{1,3}»
Match any single character that is NOT a line break character (line feed) «.?»
Between zero and one times, as few or as many times as needed to find the longest match in combination with the other quantifiers or alternatives «?»
Match the regex below and capture its match into backreference number 2 «((\/)?[^ ]*)?»
Between zero and one times, as few or as many times as needed to find the longest match in combination with the other quantifiers or alternatives «?»
Match the regex below and capture its match into backreference number 3 «(\/)?»
Between zero and one times, as few or as many times as needed to find the longest match in combination with the other quantifiers or alternatives «?»
Match the character 「/」 literally «\/»
Match any single character that is NOT present in the list below and that is NOT a line break character (line feed) «[^ ]*»
Between zero and unlimited times, as few or as many times as needed to find the longest match in combination with the other quantifiers or alternatives «*»
The literal character 「 」 « »
Assert position at the end of a word (position preceded by but not followed by an ASCII letter, digit, or underscore) «[[:>:]]»
嘗試'「[[:<:]] 10.1.127.4 /」' –
嗯,我挺想的吧:) – Anse
這是沒有意義的字邊界,T在'/'和字符串結尾之間沒有字邊界。 –