crossroadlabs / Regex

Regular expressions for swift
Apache License 2.0
332 stars 33 forks source link

Swift 4 - 'range(at:)' has been renamed to 'rangeAt(_:)' #45

Closed ItsMeSandu closed 6 years ago

ItsMeSandu commented 6 years ago

I'm using your lib with the version 1.1.0

I got this error message for the file Match.swift.

The following are the affected lines: 117: let stringRange = try? match.range(at: i).asRange(ofString: source) 133: return try? match.range(at: index).asRange(ofString: source) 145: return try? match.range(at: groupIndex).asRange(ofString: source)

ItsMeSandu commented 6 years ago

i had the following snippet in my podfile which caused the error:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end

    puts "#{target.name}"
  end
end