I suspect you'd do better to rewrite the handlers that use it, rather than the command itself -- commands with lots of optional parameters are always complicated to replace. You may end up with more handlers, but have to supply fewer parameters to use them.
on replaceThis:theFind inThis:theString withThis:theReplace
set anNSString to current application's NSString's stringWithString:theString
set theResult to anNSString's stringByReplacingOccurrencesOfString:theFind withString:theReplace options:((current application's NSRegularExpressionSearch) + (current application's NSCaseInsensitiveSearch as integer)) range:{0, anNSString's |length|()}
return theResult as text
end replaceThis:inThis:withThis:
on returnFirstMatchOf:theFind inThis:theString
set anNSString to current application's NSString's stringWithString:theString
set theRange to anNSString's rangeOfString:theString options:((current application's NSRegularExpressionSearch) + (current application's NSCaseInsensitiveSearch as integer))
if |length| of theRange = 0 then return false
set theResult to anNSString's substringWithRange:theRange
return theResult as text
end returnFirstMatchOf:inThis:
on existsFirstMatchOf:theFind inThis:theString
set anNSString to current application's NSString's stringWithString:theString
set theRange to anNSString's rangeOfString:theString options:((current application's NSRegularExpressionSearch) + (current application's NSCaseInsensitiveSearch as integer))
if |length| of theRange = 0 then return false
return true
end existsFirstMatchOf:inThis: