NSData Detector with swift

Related tags

Label NSDataDetector
Overview

NSDataDetector

This playground demonstrates a weird difference in behaviour between Xcodes 12.5.1 and 13.1 regarding NSDataDetector. Try to run it using these two versions and take a look at the different outputs:

Xcode 12.5.1

SCENARIO: Original string
DATE + LINK: ["2020/11/16", "2020/11/16", "www.application.com", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "https://www.application.com/path/to/api?"]
DATE: ["2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

SCENARIO: Without parenthesis
DATE + LINK: ["2020/11/16", "2020/11/16", "www.application.com", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "https://www.application.com/path/to/api?"]
DATE: ["2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

SCENARIO: Without square brackets
DATE + LINK: ["2020/11/16", "2020/11/16", "www.application.com", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "https://www.application.com/path/to/api?"]
DATE: ["2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

SCENARIO: Without parenthesis and square brackets
DATE + LINK: ["2020/11/16", "2020/11/16", "www.application.com", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "https://www.application.com/path/to/api?"]
DATE: ["2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

Xcode 13.1

SCENARIO: Original string
DATE + LINK: ["2020/11/16"]
DATE: ["2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

SCENARIO: Without parenthesis
DATE + LINK: ["2020/11/16", "2020/11/16", "www.application.com"]
DATE: ["2020/11/16", "2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

SCENARIO: Without square brackets
DATE + LINK: ["2020/11/16"]
DATE: ["2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]

SCENARIO: Without parenthesis and square brackets
DATE + LINK: ["2020/11/16", "2020/11/16", "www.application.com", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "https://www.application.com/path/to/api?"]
DATE: ["2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16", "2020/11/16"]
LINK: ["www.application.com", "https://www.application.com/path/to/api?"]
You might also like...
Fashion Detection in the Wild (Deep Clothes Detector)
Fashion Detection in the Wild (Deep Clothes Detector)

Deep Clothes Detector is a clothes detection framework based on Fast R-CNN. Given a fashion image, this software finds and localizes potential upper-body clothes, lower-body clothes and full-body clothes in it, respectively.

QR code detector. Simple usage, you can get recognition results via delegate or callback.

SPQRCode QR code detector. Simple usage, you can get recognition results via delegate or callback. Installation Swift Package Manager CocoaPods Manual

A fast, pure swift MongoDB driver based on Swift NIO built for Server Side Swift
A fast, pure swift MongoDB driver based on Swift NIO built for Server Side Swift

A fast, pure swift MongoDB driver based on Swift NIO built for Server Side Swift. It features a great API and a battle-tested core. Supporting both MongoDB in server and embedded environments.

Swift-music - swift-music is a swift package that provides an easy-to-use API for music related developments.

🎼 swift-music Introduction swift-music is a swift package that provides an easy-to-use API for music related developments. Currently available module

Swift-extensions - Swift package extending the Swift programming language.

swift-extensions A package containing extensions for the Swift programming language. Contribution Reporting a bug If you find a bug, please open a bug

BCSwiftTor - Opinionated pure Swift controller for Tor, including full support for Swift 5.5 and Swift Concurrency

BCSwiftTor Opinionated pure Swift controller for Tor, including full support for

Linenoise-Swift  A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement.
Linenoise-Swift A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement.

Linenoise-Swift A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement. Supports Mac OS and Linux Line edit

SwiftLint - A tool to enforce Swift style and conventions, loosely based on Swift Style Guide.
SwiftLint - A tool to enforce Swift style and conventions, loosely based on Swift Style Guide.

SwiftLint - A tool to enforce Swift style and conventions, loosely based on Swift Style Guide.

MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class.

MisterFusion MisterFusion makes more easier to use AutoLayout in Swift & Objective-C code. Features Simple And Concise Syntax Use in Swift and Objecti

Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.

BlueSocket Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux. Prerequisites Swift Swift Open Source swift-4.0

Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)
Server-side Swift. The Perfect core toolset and framework for Swift Developers. (For mobile back-end development, website and API development, and more…)

Perfect: Server-Side Swift 简体中文 Perfect: Server-Side Swift Perfect is a complete and powerful toolbox, framework, and application server for Linux, iO

RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable

Q: How will my calendar dateCells look with this library? A: However you want them to look. More Images Features Range selection - select dates in a r

Swift Validator is a rule-based validation library for Swift.
Swift Validator is a rule-based validation library for Swift.

Swift Validator is a rule-based validation library for Swift. Core Concepts UITextField + [Rule] + (and optional error UILabel) go into

:octocat: AdaptiveController is a 'Progressive Reduction' Swift UI module for adding custom states to Native or Custom iOS UI elements. Swift UI component by @Ramotion
:octocat: AdaptiveController is a 'Progressive Reduction' Swift UI module for adding custom states to Native or Custom iOS UI elements. Swift UI component by @Ramotion

ADAPTIVE TAB BAR 'Progressive Reduction' module for adding custom states to Native or Custom UI elements. We specialize in the designing and coding of

 SQLite.swift - A type-safe, Swift-language layer over SQLite3.
SQLite.swift - A type-safe, Swift-language layer over SQLite3.

SQLite.swift provides compile-time confidence in SQL statement syntax and intent.

RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

Swift Playgrounds desenvolvido para o Swift Student Challenge da WWDC 21
Swift Playgrounds desenvolvido para o Swift Student Challenge da WWDC 21

Pile Up Swift Playgrounds desenvolvido para o Swift Student Challenge da WWDC 21 Descrição Pile Up é um quebra cabeça cujo objetivo é empilhar os bloc

JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift.

JSEN /ˈdʒeɪsən/ JAY-sən JSEN (JSON Swift Enum Notation) is a lightweight enum representation of a JSON, written in Swift. A JSON, as defined in the EC

Owner
Vinícius Rodrigues de Uzêda
Vinícius Rodrigues de Uzêda
Swift TTTAttributedLabel replacement

Nantes ?? This library is a Swift port/fork of the popular Objective-C library TTTAttributedLabel. Much ❤️ and credit goes to Mattt for creating such

Instacart 1k Dec 22, 2022
Lightweight library to set an Image as text background. Written in swift.

Simple and light weight UIView that animate text with an image.

Lucas Ortis 552 Sep 9, 2022
A triangle shaped corner label view for iOS written in Swift.

A triangle shaped corner label view for iOS written in Swift. This view is a subclass of UIView. It can be created and customized from the Storyboard

Mukesh Thawani 167 Nov 30, 2022
MTLLinkLabel is linkable UILabel. Written in Swift.

# MTLLinkLabel is linkable UILabel. Written in Swift. Requirements iOS 8.0+ Xcode 7.3+ Installation Carthage You can install Carthage with Homebrew. $

Recruit Holdings. Media Technology Lab 74 Jul 1, 2022
Swift UIView for sliding text with page indicator

SlidingText for Swift Requirements Requires iOS 8 or later and Xcode 6.1+ Installation SlidingText is available through CocoaPods. To install it, simp

Dionysis Karatzas 53 Mar 1, 2022
Cheap price detector - Cheap Flight Ticket Price Detector

Cheap Flight Price Detector ✈️ Have you ever searched for flight tickets in a wa

Daniel Grimm 1 Mar 11, 2022
Monaka convert custom struct to NSData.

Monaka Overview Monaka convert custom struct and fundamental values to NSData (also nested array and dictionary). Purpose You can persistent store of

Naruki Chigira 22 Oct 29, 2020
Alamofire extension for serialize NSData to SwiftyJSON

Alamofire-SwiftyJSON An extension to make serializing Alamofire's response with SwiftyJSON easily. ⚠️ To use with Swift 3.x please ensure you are usin

SwiftyJSON 1.4k Dec 22, 2022
An NSFW image detector for Swift built as an extension on UIImage.

Swift_NSFW_Detector An NSFW image detector for Swift built as an extension on UIImage. If you've ever allowed users to share images you are probably w

Chris Brown 5 Nov 27, 2022
Simple motion detector for ⌚️ (watchOS) shake gesture.

WatchShaker Simple motion detector for ⌚️ (watchOS) shake gesture. WatchShaker is a watchOS helper to get your ⌚️ shake movements Requirements watchOS

Ezequiel França 200 Dec 22, 2022