diff --git a/PySwiftyRegex.xcodeproj/project.pbxproj b/PySwiftyRegex.xcodeproj/project.pbxproj
index c9bf6c2..dcb55b6 100644
--- a/PySwiftyRegex.xcodeproj/project.pbxproj
+++ b/PySwiftyRegex.xcodeproj/project.pbxproj
@@ -280,7 +280,9 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = PySwiftyRegex/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MACH_O_TYPE = staticlib;
+ MACOSX_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = me.cezheng.PySwiftyRegex;
@@ -333,7 +335,9 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = PySwiftyRegex/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MACH_O_TYPE = staticlib;
+ MACOSX_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = me.cezheng.PySwiftyRegex;
PRODUCT_NAME = "$(PROJECT_NAME)";
@@ -357,7 +361,7 @@
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
- MACH_O_TYPE = mh_dylib;
+ MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
@@ -376,7 +380,7 @@
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
- MACH_O_TYPE = mh_dylib;
+ MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
diff --git a/PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/PySwiftyRegex.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/PySwiftyRegex/PySwiftyRegex.swift b/PySwiftyRegex/PySwiftyRegex.swift
index 6892c38..67dcb60 100644
--- a/PySwiftyRegex/PySwiftyRegex.swift
+++ b/PySwiftyRegex/PySwiftyRegex.swift
@@ -270,8 +270,7 @@ public class re {
guard let result = result, result.range.length > 0 else {
return
}
-
- end = string.characters.index(string.startIndex, offsetBy: result.range.location)
+ end = string.index(string.startIndex, offsetBy: result.range.location)
results.append(String(string[start.. 0 {
results += MatchObject(string: string, match: result).groups()
diff --git a/PySwiftyRegexTests/ReRegexObjectTests.swift b/PySwiftyRegexTests/ReRegexObjectTests.swift
index 65f18d7..fa6949f 100644
--- a/PySwiftyRegexTests/ReRegexObjectTests.swift
+++ b/PySwiftyRegexTests/ReRegexObjectTests.swift
@@ -33,9 +33,9 @@ class ReRegexObjectTests: XCTestCase {
XCTAssertEqual(match.group()!, "this one is different from that")
XCTAssertEqual(match.group(1)!, "this")
XCTAssertEqual(match.group(2)!, "that")
- XCTAssertEqual(match.span()!, string.startIndex..