Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the replacement skills of regular expressions in VS

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the replacement skills of regular expressions in VS. It is very detailed and has a certain reference value. Friends who are interested must read it!

The following is the replacement of VS2008, replacing {. *} with\ 1.

When you get to VS2012, replace (. *) with $1

HospitalID = Request.QueryString ["hospital"]

DepartmentID = Request.QueryString ["department"]

/ / /

/ / Product code

/ / /

/ / replace with the following

[DisplayName ("Product Code")]

Use regular deletion of blank lines in vs2008

A regular expression should have a structure like this: [beginning of a line] [any white space character] [newline]

According to the regular table, the corresponding value is: ^: B *\ n

Where ^ represents the beginning of a line

B stands for a white space character

* represents any one, while: B * represents any white space character

\ nstands for newline character

Steps

1. Ctrl+H calls up the Quick replace window

2. Fill in the figure below and click replace.

In fact, in editplus, you directly set the

\ n\ njust replace it with\ n.If it doesn't work, it means there are other characters in the blank line. You can refer to the rule below.

^ [\ s\ S] *\ n

The above is all the content of the article "what are the replacement skills of regular expressions in VS?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report