Skip to content

Commit 93f3617

Browse files
committed
fix: escape regex string properly and update gitignore
- Fixed regex string to use proper escaping instead of raw string literal - Updated .gitignore to be more comprehensive and project-appropriate - Removed Package.resolved from version control
1 parent 132c224 commit 93f3617

File tree

3 files changed

+32
-123
lines changed

3 files changed

+32
-123
lines changed

.gitignore

Lines changed: 31 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,40 @@
1-
# Xcode
2-
#
3-
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4-
5-
## Build generated
6-
build/
7-
DerivedData/
8-
9-
## Various settings
10-
*.pbxuser
11-
!default.pbxuser
12-
*.mode1v3
13-
!default.mode1v3
14-
*.mode2v3
15-
!default.mode2v3
16-
*.perspectivev3
17-
!default.perspectivev3
18-
xcuserdata/
1+
# Swift
2+
.build/
3+
.swiftpm/
4+
Package.resolved
195

20-
## Other
21-
*.moved-aside
22-
*.xccheckout
23-
*.xcscmblueprint
6+
# Environment files
7+
.env*
248

25-
## Obj-C/Swift specific
26-
*.hmap
27-
*.ipa
28-
*.dSYM.zip
29-
*.dSYM
9+
# Xcode
10+
*.xcodeproj
11+
*.xcworkspace
12+
*.xcuserdata
13+
DerivedData/
3014

31-
## Playgrounds
32-
timeline.xctimeline
33-
playground.xcworkspace
15+
# IDEs
16+
.vscode/
17+
.idea/
18+
*.swp
19+
*.swo
20+
*~
3421

35-
# Swift Package Manager
36-
#
37-
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38-
# Packages/
39-
# Package.pins
40-
.build/
41-
.swiftpm/
42-
Packages/*
22+
# Generated by MacOS
23+
.DS_Store
4324

44-
# CocoaPods
45-
#
46-
# We recommend against adding the Pods directory to your .gitignore. However
47-
# you should judge for yourself, the pros and cons are mentioned at:
48-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
49-
#
50-
# Pods/
25+
# Generated by Windows
26+
Thumbs.db
5127

52-
# Carthage
53-
#
54-
# Add this line if you want to avoid checking in source code from Carthage dependencies.
55-
# Carthage/Checkouts
56-
# Carthage/Build
28+
# Generated by Linux
29+
*~
5730

58-
# fastlane
59-
#
60-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61-
# screenshots whenever they are needed.
62-
# For more information about the recommended setup visit:
63-
# https://docs.fastlane.tools/best-practices/source-control/#source-control
31+
# Log files
32+
*.log
6433

65-
fastlane/report.xml
66-
fastlane/Preview.html
67-
fastlane/screenshots
68-
fastlane/test_output
34+
# AI
35+
.claude
36+
CLAUDE.MD
6937

70-
.DS_Store
71-
*.xcodeproj/*
38+
# Temporary files
39+
*.tmp
40+
*.temp

Package.resolved

Lines changed: 0 additions & 60 deletions
This file was deleted.

Sources/EmailAddress/EmailAddress.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,5 +256,5 @@ extension EmailAddress {
256256

257257
extension EmailAddress {
258258
/// A non-RFC5322 compliant regex for simple validation scenarios
259-
public static let regex: String = #"^(?!.*\.\.)[A-Za-z0-9](?:[A-Za-z0-9._%+-]{0,62}[A-Za-z0-9])?@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$"#
259+
public static let regex: String = "^(?!.*\\.\\.)[A-Za-z0-9](?:[A-Za-z0-9._%+-]{0,62}[A-Za-z0-9])?@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
260260
}

0 commit comments

Comments
 (0)