Regular Expression, Select word between two words

前端 未结 3 920
青春惊慌失措
青春惊慌失措 2021-02-04 15:57

I\'m reallllly new to regex and I need some help. I tried figuring out myself but had no luck!

I am trying to select text between 2 strings (character for the last strin

3条回答
  •  深忆病人
    2021-02-04 16:09

    another alternative is to use this pattern

    (?<=word\s).*(?=\s:)
    

    See Lookahead and Lookbehind Zero-Width Assertions

提交回复
热议问题