I want to remove this code
[gallery columns="2" link="none" ids="69,50" orderby="rand"]
from a string. The [gallery .....] is always the same and the ... changes. How can I do this? Then I want to save the ids value in another string. What is the most elegant way? Thank you.