Match Sequence using RegEx After a Specified Character

前端 未结 3 915
温柔的废话
温柔的废话 2020-12-05 13:46

The initial string is [image:salmon-v5-09-14-2011.jpg]

I would like to capture the text \"salmon-v5-09-14-2011.jpg\" and used GSkinner\'s RegEx Tool

3条回答
  •  遥遥无期
    2020-12-05 14:32

    You have the correct regex only the tool you're using is highlighting the entire match and not just your capture group. Hover over the match and see what "group 1" actually is.

    If you want a slightly more robust regex you could try :([^\]]+) which will allow for any characters other than ] to appear in the file name portion.

提交回复
热议问题