Regular Expression only match if String ends with target

前端 未结 2 1046
忘了有多久
忘了有多久 2020-11-30 11:00

I need a regular expression that will only match to the String if it ends with the target that I am looking for. I need to locate a file with a specific extension, problem i

2条回答
  •  天涯浪人
    2020-11-30 11:34

    $ is used to match the end of the string. and can be used like

    "string"$
    

    like

    xyz$
    

    if you want to end with xzy

提交回复
热议问题