정규식을 사용하여 검색 및 바꾸기
Search Results 보기에서 정규식을 사용하여 파일 전체에서 검색 및 바꾸기를 하세요.
Qt Creator 에서 사용되는 정규식은 Perl 정규식을 모델로 합니다. 정규식 사용에 대한 자세한 내용은 QRegularExpression 을 참조하세요.
예를 들어, 동일성 검사(foo == bar)를 함수(foo.equals(bar))로 바꾸려면 다음과 같이 하세요:
- 바꾸기 작업은 실행 취소할 수 없으므로 변경 내용을 버전 관리에 커밋합니다.
- Ctrl+Shift+F를 선택하거나 Edit > Find/Replace > Advanced Find > Open Advanced Find 으로 이동하여 Search Results 을 엽니다.

- Scope 에서 검색에 적합한 것을 선택합니다.
- Use regular expressions 을 선택합니다.
- Search for 에 다음 텍스트를 입력합니다:
if \((.*) == (.*)\)
- Search & Replace 을 선택하여 검색 결과 목록을 확인합니다.

- Replace with 에 다음 텍스트를 입력합니다:
if (\1.strictlyEquals(\2))
- Replace 을 선택하여 텍스트의 모든 인스턴스를 바꿉니다.
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.