Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- swiftUI
- clean architecture
- 리펙터링
- 애니메이션
- map
- Observable
- UICollectionView
- HIG
- Xcode
- Human interface guide
- RxCocoa
- collectionview
- swift documentation
- SWIFT
- ios
- 클린 코드
- 리팩토링
- 리펙토링
- ribs
- Refactoring
- Protocol
- uiscrollview
- Clean Code
- 스위프트
- MVVM
- UITextView
- uitableview
- combine
- rxswift
- tableView
Archives
- Today
- Total
목록핸드폰 번호 정규식 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] 문자열 정규식 처리 방법 (Regex, Regular Expression, 전화번호, 이메일, 비밀번호)
특정 문자 형태와 일치하는지? regex를 문자열을 정의한 후, regex와 확인하려는 문자 형태를 비교하여 확인 확인하는 방법은 range(of:options:)라는 String 메소드 사용 문자열내에서 특정 문자열이 존재하면 해당 문자열의 범위(NSRange)를 리턴하는 메소드 let regex = "[0-9]" let isContains = "2".range(of: regex, options: .regularExpression) != nil // true 정규식 예제 문자열 일부가 일치 문자열 범위는 대괄호 사용 [] let regex1 = "[0-9]" let test1_1 = "1".range(of: regex1, options: .regularExpression) != nil let test1..
iOS 응용 (swift)
2022. 8. 18. 22:05