I would like to merge two arrays containing a list of files plus their revision in brackets.
For example:
Fist array:
0 => A[1], 1 => B[2], 2 => C[2], 3 => D[2]
Second one,
0 => B[3], 1 => C[4], 2 => E[4], 3 => F[2], 4 => G[2]
Like I said, I would be able to merge both arrays, but overwriting the first one by the data present in the second one.
I used this regex to only grab filenames (removing the revision number). I don't know if I am correct on this point):
/\[[^\)]+\]/
The result I am looking for would be this,
0 => A[1], 1 => B[3], 2 => C[4], 3 => D[2], 4 => E[4], 5 => F[2], 6 => G[2]
Also, I was about to forget, the whole thing is in PHP.