Regex

出自維基百科,自由嘅百科全書
跳去導覽 跳去搵嘢

Regex(全名 regular expression)係指由一段字符當中搵出某串特定嘅字符,好似係[1]

^The(搵出以 The 做開頭嘅字符串)
end$(搵出以 end 做結尾嘅字符串)
^The end$(搵出同「The end 」完美符合嘅字符串)

... 呀噉。

睇埋[編輯]

[編輯]

  1. Aho, Alfred V. (1990). van Leeuwen, Jan (ed.). Algorithms for finding patterns in strings. Handbook of Theoretical Computer Science, volume A: Algorithms and Complexity. The MIT Press. pp. 255-300.