当前位置:网站首页>Vscode matches and replaces the brackets
Vscode matches and replaces the brackets
2022-07-06 17:29:00 【geekqian】
adopt VSCode Quickly XPath Replace with the format you need .
1. Copy from web page XPath
Use Chrome Browser browsing web pages , Right click on the page element and select Check (Inspect)

Then right click on the selected element tag and select Copy -> Copy Full XPath

2. Replace with the desired format
Copied from webpage XPath after , The index of the element will be marked with brackets and numbers , as follows .
/html/body/div[1]/div/div[2]/div/div[2]/div[2]/div[2]/div/div[2]/div[1]/div[1]/div/div[2]/div/p[2]/a[1]
If you don't need an index at this time, you can use it in VSCode Replace with regular matching , The specific way is as follows :
Use Ctrl+H open Replace function , stay Find Column input regular expression : \[.\]
among \ For parentheses [] Do to escape , . Then it means matching any character ,Replace Don't write anything in a column , Then use the shortcut key Ctrl + Alt + Enter Replace all .


stay UIPath Used in , You need to put / Replace with >

边栏推荐
猜你喜欢

Final review of information and network security (based on the key points given by the teacher)

Akamai浅谈风控原理与解决方案

Set up the flutter environment pit collection

CTF reverse entry question - dice

手把手带你做强化学习实验--敲级详细

Programmer orientation problem solving methodology

Flink 解析(二):反压机制解析

Models used in data warehouse modeling and layered introduction

案例:检查空字段【注解+反射+自定义异常】

JVM garbage collector part 1
随机推荐
Only learning C can live up to expectations TOP4 S1E6: data type
[mmdetection] solves the installation problem
Junit单元测试
吴军三部曲见识(四) 大家智慧
EasyRE WriteUp
07 personal R & D products and promotion - human resources information management system
04个人研发的产品及推广-数据推送工具
DOS function call
Coursera cannot play video
Interview collection library
arithmetic operation
mysql 基本增删改查SQL语句
vscode
C# WinForm系列-Button简单使用
C version selenium operation chrome full screen mode display (F11)
Flink parsing (VI): savepoints
JVM 垃圾回收器之Garbage First
CentOS7上Redis安装
Flink 解析(五):State与State Backend
JVM之垃圾回收器下篇