password
URL
type
status
date
slug
summary
tags
category
icon
标签
是否汉化
醉眼看人间,人人都温柔,醒时看事态,事事都炎凉。
实例
将以下表中内容的字段名取出来,并添加双引号,在其他代码中复制引用
步骤1
- 新建文件 empty,将内容复制到文件中
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F576a26a2-bfff-4d59-a0cd-a1730425c7ca%2FUntitled.png?table=block&id=2e240ff6-b79b-4251-a580-39de01a673d2&t=2e240ff6-b79b-4251-a580-39de01a673d2&width=2108&cache=v2)
步骤2
- command+r 快捷键打开查找替换功能
- 去掉”=”后面所有内容,只保留字段名
- 输入=.*$
注:第一行输入=.*$ 表示查找等号后面所有内容;第二行不输入表示替换清空
- 点击regular打开正则模式
- 点击Replace All
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2Fbac1422a-f7ae-4746-9828-dbc62bb6d4e2%2FUntitled.png?table=block&id=2c59ae24-21e6-4c6b-845d-e54aa7dd55c5&t=2c59ae24-21e6-4c6b-845d-e54aa7dd55c5&width=2354&cache=v2)
- 效果
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F0728f06b-c1e9-473e-b351-e46f08ecccac%2FUntitled.png?table=block&id=1e06dc10-7740-4a20-b7ab-c2a54c93fe5d&t=1e06dc10-7740-4a20-b7ab-c2a54c93fe5d&width=1402&cache=v2)
步骤3
- 删除字段前冗余空格
- 第一行输入空格,第二行不输入
- 点击Replace All
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2Fc8a067cd-5b95-4ca0-ada1-6a90afd3b37e%2FUntitled.png?table=block&id=22c99591-b801-4b83-8680-db73c3eb3805&t=22c99591-b801-4b83-8680-db73c3eb3805&width=1608&cache=v2)
- 效果
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F31c10b5d-7c0c-443d-819b-8976234a7c51%2FUntitled.png?table=block&id=ad565fad-b749-472e-ad4d-434f66c1f77d&t=ad565fad-b749-472e-ad4d-434f66c1f77d&width=1152&cache=v2)
步骤3
- 给字段添加双引号
- 光标移动字段首位置
- 第一行输入符号^ (表示开始位置)
- 第二行输入” (替换为”)
- 光标移动后字段名末位置
- 第一行输入符号$ (表示末位置)
- 第二行输入” (替换为”)
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2Fba52c1e0-0c88-40c8-ab87-812e6f567866%2FUntitled.png?table=block&id=e30164e8-8a81-40a2-b734-e8ea8f69d205&t=e30164e8-8a81-40a2-b734-e8ea8f69d205&width=1552&cache=v2)
- 效果
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F556bec9e-7011-4529-a907-515973b91d24%2FUntitled.png?table=block&id=582a617b-d291-43fe-b0c3-92188054809f&t=582a617b-d291-43fe-b0c3-92188054809f&width=1050&cache=v2)
参考link
离开乏味的皮囊,自由的灵魂在路上
- Name: Alan Hsu
- Tag: 随感、技术、经验、旅行、推荐、生活、音乐、电影 etc.
- Email:xulanzhong521gmail.com
- Twitter:@AlanHsu521
- Telegram:@AlanHsu521
- WeChat: Alan_Hsu_521
- Github: https://github.com/xsoway/
![notion image](https://cdn.jsdelivr.net/gh/xsoway/xmylog_imgs@main/wechat.jpeg?t=22021350-1a24-4d89-8587-7f662f39f57a)
![notion image](https://cdn.jsdelivr.net/gh/xsoway/xmylog_imgs@main/%E5%85%AC%E4%BC%97%E5%8F%B7.jpeg?t=f664a108-4599-4d40-9993-42ebe1a54f00)
- Author:Alan_Hsu
- URL:https://xmylog.com/article/articles_pycharm_regular
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts