Question: I am trying to replace version number (like `00.00.00-00`) in a file with actual version number in shell.

For this I use the following command:

```
sed -i 's/[0-9]*\.+[0-9]*\.+[0-9]*\-+[0-9]*/MyNewVersion/g' file.txt

```

Example of the file.txt:

```
Some text Bla Bla Bla-00.00.00-00.x86_SomeOtherInterestingThings

```

Unfortunately it does not give me desired result.
Any advice?

Answer: 
First of all, you would need `-r` flag in order to mark the pattern as a regular expression. Next, you would need to move the quantifier `+` next to the number ranges, so I believe you should be using this command:

```
sed -i -r 's/[0-9]+\.[0-9]+\.[0-9]+-[0-9]+/MyNewVersion/g' file.txt

```
based on the example input/pattern, this line should help:

```
sed 's/[-0-9.]\+\([.]x86_\)/-NEW\1/'

```