VSCode regex find & replace submatch math ?

VSCode regex find & replace submatch math ?

Asked on January 11, 2019 in Regex.
Add Comment


  • 2 Answer(s)

    Visual Studio Code regex find & replace submatch math for that use below points:

    A regular expression of (foobar) reference the first group using $1 and if we have more groups in the replace input field.

     

    Answered on January 11, 2019.
    Add Comment

    By using the following code:

    Find    Carrots(With)Dip(Are)Yummy
    Replace   Bananas$1Mustard$2Gross
    Result    BananasWithMustardAreGross
    

    In regular expression,anything can be parentheses.

    Answered on January 11, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.