Thanks for the asnwers, I really appreciate them.
As for PHP, I found in the def. of a function such thing:
"If matches
is provided, then it is filled with
the results of search. $matches[0] will contain the
text that matched the full pattern, $matches[1]
will have the text that matched the first captured parenthesized
subpattern, and so on."
As I might (or not?) understood it, the the futher searches will be stored in an array as well.
But as I couldn't spend too much time playing with those functions, just used the following (for anyone that can benefit):
//Get text and search for adequate string, than replace the result with function 'display'
if(preg_match('/\[options=(.*)\]/', $content, $matches)) {
$content = preg_replace('/\[options=.*\]/', display($matches[1]), $content);
}
//what you want to display accordingly to the options given to input
function display($ids) {
$id = split(',', $ids);
}
So if you will have some page, that will have [options=9,12,17], the script will replace it with proper content (useful for dynamic, cofigurable data; I'm using it as a filter for plugins in WordPress)