>>>>> snip >>>>>
Hm, OK, sorry.  It works in 3.8.5
(http://www.geocities.jp/kosako3/oniguruma/) it seems.  Btw, can't that
regular expression be simplified a bit?  The two * could be turned into
a single ? and the [^()] can be turned into [^(] and [^)], or?,
        nikolai
>>>>> snip >>>>>

I really do think so - but I'm starting experiments with Ruby/Onigurama now. I try to find some basic building
blocks that can be used interactively by '#{patternvar}'.

The above Regex now works (it is still unreadable), but a lot has to be done. Some things related to the
produced MatchData object are still unclear for me if one is using named groups. The Example

>>>>>>>>>>>>> Code >>>>>>>>>>>>>>>
orgstring= <<EOT
firstproc(p1,p2,p3(p31,p32),p4(p41,p42(p421,p422),p43),p5)
nochneproc   (   einfach, nur    , ein, paar,   parameter   )
dieletzte  (   auch, mit (  fast ) ,  allem )
EOT

pattern1 = /(?<n>\w+)\s*(?<p>\((?<bal>[^()]*?((x|(\(\g<bal>\)))[^()]*?)*?)\))/
pattern2 = /[(,]\s*(?<bal>[^()]*?((x|(\(\g<bal>\)))[^()]*?)*?)(?=\s*[,)])/

orgstring.scan(pattern1) do
  puts "\n---- Name: '#{$~[1]}'"
  $~[2].scan(pattern2) do
    puts "Parameter: '#{$~[1]}'"
  end
end
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

produces

>>>>>>>>>>>>> Data >>>>>>>>>>>>>>>>
---- Name: 'firstproc'
Parameter: 'p1'
Parameter: 'p2'
Parameter: 'p3(p31,p32)'
Parameter: 'p4(p41,p42(p421,p422),p43)'
Parameter: 'p5'

---- Name: 'nochneproc'
Parameter: 'einfach'
Parameter: 'nur'
Parameter: 'ein'
Parameter: 'paar'
Parameter: 'parameter'

---- Name: 'dieletzte'
Parameter: 'auch'
Parameter: 'mit (  fast )'
Parameter: 'allem'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

It's still an early step.

Best regards, Wolfgang Nadasi-Donner