Hi - I hope someone may be able to help me here.
I’m trying to build an NSRegularExpression within Swift and feed it this pattern
(?x) (?(DEFINE) (?<com>(?U:/\*((?:(?&com)|[\s\S])*\*/))) ) (--.*$) | (?&com)
I’m using a subroutine to recurse through and pattern match. I’m getting an error when constructing the NSRegularExpression telling me I’m passing in an invalid value. I’m guessing NSRegularExpression doesn’t support subroutines.
Any ideas out there how I can recurse within a RegEx expression that will work with Swift?