• Oracle10g正则表达式


    Regular expressions in Oracle

    With 10g, regular expressions are finally available in SQL. That is, they were already supported through the owa_pattern package.
    The new operators and functions are regexp_like, regexp_instr, regexp_substr and regexp_replace
    symbol Matches
    . Any character except newline
    ^ Start of a line
    $ End of a line
    * 0, 1, or more of the preceding element. The preceding element can be grouped with ()
    {n} Exactly n repetitions of the preceding element. The preceding element can be grouped with ()
    {n,} Matches n or more repetitions of the preceding element. The preceding element can be grouped with ()
    {m,n} Matches between m and n repetitions of the preceding element. The preceding element can be grouped with ()
    [abc] Character list, matches a, b OR c.
    [g-l] g, h, i, j, k, OR l
    | groups alternatives

    Character classes

    The following character classes are suppored:
    • [[:alnum:]]
      Alphanumeric characters
    • [[:alpha:]]
      Alphabetic characters
    • [[:blank:]]
      blank space characters
    • [[:cntrl:]]
      Control characters
    • [[:digit:]]
      0 through 9, or [0-9]
    • [[:graph:]]
      [[:punct:]] + [[:upper:]] + [[:lower:]] + [[:digit:]]
    • [[:lower:]]
      lowercase alphabetic characters
    • [[:print:]]
      Printable characters
    • [[:punct:]]
      punctuation characters
    • [[:space:]]
      Non-printing space characters
    • [[:upper:]]
      Uppercase alphabetic characters
    • [[:xdigit:]]
      hexadecimal characters
    Character classes can be negated: [^[:CHAR-CLASS:]].

    Equivalence classes

    For example, the following not only matches an a, but also ä.
    [[=a=]]
    

    Links

    http://www.adp-gmbh.ch/blog/2005/december/22.html

  • 相关阅读:
    uva 816
    SQL语言类
    VTK中国文字显示和简单的医疗图像浏览软件
    系统开始了解--感兴趣的文章
    的天数,以一个日期与当前日期的
    POJ 2528 QAQ段树+分离
    IT该忍者神龟Instant client required
    进程和线程之间的通信
    2014——我的求职(两)
    如何绕过chrome的弹窗拦截机制
  • 原文地址:https://www.cnblogs.com/midea0978/p/1114838.html
Copyright © 2020-2023  润新知