Skip to content
Advertisement

Using sed with regex to match varying lines

I’m having some issues used sed to match a regex pattern. An example would be with the following lines:

spring-core-4.0.0 should be spring-core-4.1.0

spring-web-4.0.0 should be spring-web-4.1.0

I want the regex to match any characters in between spring and the version number. I’m not sure if I need to do something else for sed to remember what those characters are in each line.

JavaScript

The current output is placing the regex pattern in the output, instead of matching it. Thanks for any tips.

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement