Regular Expression to find a string included between two characters while EXCLUDING the delimiters

前端 未结 12 2741
旧时难觅i
旧时难觅i 2020-11-21 23:49

I need to extract from a string a set of characters which are included between two delimiters, without returning the delimiters themselves.

A simple example should b

12条回答
  •  情书的邮戳
    2020-11-22 00:36

    I wanted to find a string between / and #, but # is sometimes optional. Here is the regex I use:

      (?<=\/)([^#]+)(?=#*)
    

提交回复
热议问题