How to match “anything up until this sequence of characters” in a regular expression?

后端 未结 12 2126
旧时难觅i
旧时难觅i 2020-11-22 11:51

Take this regular expression: /^[^abc]/. This will match any single character at the beginning of a string, except a, b, or c.

If you add a *

12条回答
  •  囚心锁ツ
    2020-11-22 12:19

    try this

    .+?efg
    

    Query :

    select REGEXP_REPLACE ('abcdefghijklmn','.+?efg', '') FROM dual;
    

    output :

    hijklmn
    

提交回复
热议问题