Why is ex (Vim) catching matching pattern to the end of line?
00:37 28 Sep 2018

The file contains the following line:

[assembly: AssemblyVersion("1.0.0.0")]

The Bash script that replaces one version with another:

echo "%s/AssemblyVersion\s*\(.*\)/AssemblyVersion(\"$newVersionNumber\")]/g
        w
        q
        " | ex $filePath

Why does this catch the whole line to the end, so I have to add ] at the end of replacement string?

regex vim ex