regular expression 範例


應用 Regexp “a.*b"(代表以“a"開頭以“b"結尾的任意 字串),於資料列 “12 3ab0aab4 56″ 中找尋合於該條件的字 串。 該資料列中合於 Regexp “a.*b" 的字串有 “ab", “aab",“ab0aab"。但按上列二原則「由左往右找,且盡 可能尋找最長的字串」實際上被找到的字串將為“ab0aab"。

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

What is 13 + 10 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)