Compare commits
1 Commits
scale-issues
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
0f1dc88b87
|
@@ -266,7 +266,7 @@ class ViewController: UIViewController, UIGestureRecognizerDelegate {
|
||||
func getMetadataFromFilename(path: URL) {
|
||||
// Beautiful, is it not?
|
||||
let patterns: [(NSRegularExpression, NSRegularExpression, Int, Int, Int)] = [
|
||||
(try! NSRegularExpression(pattern: #"c([0-9]+(?:x[0-9]+)?) \(v([0-9]+)\) - p([0-9]+(?:-[0-9]+)?)"#), try! NSRegularExpression(pattern: #"^(.*) - c([0-9]+(?:x[0-9]+)?) \(v([0-9]+)\) - p([0-9]+(?:-[0-9]+)?)"#), 3, 1, 2),
|
||||
(try! NSRegularExpression(pattern: #"c([0-9]+(?:x[0-9]+)?) \(v([0-9]+)\) - p([0-9]+(?:-p?[0-9]+)?)"#), try! NSRegularExpression(pattern: #"^(.*) - c([0-9]+(?:x[0-9]+)?) \(v([0-9]+)\) - p([0-9]+(?:-p?[0-9]+)?)"#), 3, 1, 2),
|
||||
(try! NSRegularExpression(pattern: "v([0-9]+) p([0-9]+(?:-[0-9]+)?) - c([0-9]+(?:x[0-9]+)?)"), try! NSRegularExpression(pattern: "^(.*) - v([0-9]+) p([0-9]+(?:-[0-9]+)?) - c([0-9]+(?:x[0-9]+)?)"), 2, 3, 1),
|
||||
]
|
||||
var pattern: NSRegularExpression! = nil
|
||||
|
||||
Reference in New Issue
Block a user