VSCode regex find & replace submatch math?

前端 未结 6 1945
栀梦
栀梦 2020-11-30 18:34
%s@{fileID: \\(213[0-9]*\\)@\\=\'{fileID: \'.(submatch(1)-1900)@

I am using this regex search and replace command in vim to subtract a constant fro

6条回答
  •  没有蜡笔的小新
    2020-11-30 18:38

    Another simple example:

    Search: style="(.+?)"
    Replace: css={css`$1`}
    

    Useful for converting HTML to JSX with emotion/css!

提交回复
热议问题