aaa[image,L,0]bbb [1]ddddffffdddd[image,R,0]ccc
When there is a String of this type, I used the following regular expression to extract only the value of the form [image,L,0].
\[.*?[^\]]\,[LMR]\,.*?[^\[]\]
In the above String, I wanted the result to be [image,L,0],[image,R,0].
However, the actual extracted values were [image,L,0],[1]ddddffffdddd[image,R,0].
I want to extract only the values with two , in square brackets. I want to know what am I missing in my regex.