Looking for a way to efficiently copy a long list of properties without their assignments being included? Avoid retyping by using a regular expression in VSCode.
Check out this sample TypeScript code snippet:
this.anchorBillingAddress = this.page.getByTestId('billing-address-section');
this.anchorShippingAddress = this.page.getByTestId('shipping-address-section');
this.anchorBilling = this.page.getByTestId('billing-section');
this.anchorGeneral = this.page.getByTestId('general-section');
this.anchorStatistics = this.page.getByTestId('statistics-section');
The desired output:
this.anchorBillingAddress
this.anchorShippingAddress
this.anchorBilling
this.anchorGeneral
this.anchorStatistics
Attempted solution using this[^\s]+
resulted in copying the assignments as well. How can I modify the regex to stop at the first white space on each line?