regular expression to match everything until the last occurrence of /

前端 未结 3 613
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 09:08

Using a regular expression (replaceregexp in Ant) how can I match (and then replace) everything from the start of a line, up to and including the last occurrence of a slash?

3条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 09:49

    You can match this:

    .*\/
    

    and replace with your text.

    DEMO

提交回复
热议问题