Skip first nn characters, take the rest with RegEx

后端 未结 3 1943
说谎
说谎 2021-01-22 15:19

I saw a question that used \\K that exists in Notepad++/pcre/PHP (reset starting point of match). However, I cannot find this option or its equivalent in Mastering Regular Expr

3条回答
  •  太阳男子
    2021-01-22 15:58

    Technichally those character are not skipped, as they are consumed and considered part of the match. If you would like to skip the characters, then you need a look behind

    (?<=(.){15})
    

提交回复
热议问题