     ///
     /// - Parameter regex: Regex to check for.
     /// - Returns: Returns the match (if any).
-    internal func firstMatch(regex: String) -> String? {
+    public func firstMatch(regex: String) -> String? {
         guard let range = self.range(of: regex, options: .regularExpression) else {
             return nil
         }

// MARK: - Convenience for optional strings.
extension Optional where Wrapped: ExpressibleByStringLiteral {
    /// Falls back to an empty string if no value is found.
    internal var safeUnwrap: String {
        guard let string = self as? String else {
            return ""
        }

        #endif
    }
    
    public func replace(_ regex: String, with replacement: String) -> String {
        var result = self
        
        let matches = self.matches(regex: regex)
