Posted By: QuickStep

## Looking for this regsub function - 26/07/05 10:18 AM

Im looking for a regsub function that looks for a calculation identifier like $sin, $cos, $int etc. etc. and puts $calc inside the brackets, but only if there are no commas inside the brackets, few examples:

Any help, im not so good with regular expressions

Code:

;Put $calc inside the functions: $sin(2 + 3) --> $sin($calc(2 + 3)) $int(2) + 4 --> $int($calc(2)) + 4 ;If there are only brackets, it should stay this way: (4 + 6) * 4 --> (4 + 6) * 6 ;Functions with commas should stay the way they are: $rand(2,6) * 6 --> $rand(2,6) * 6

Any help, im not so good with regular expressions