The replacement technique of the Regular Expression in VS, and the replacement of the Regular Expression in

Source: Internet
Author: User

The replacement technique of the Regular Expression in VS, and the replacement of the Regular Expression in

The following is the replacement method of VS2008. Use \ 1 to replace {.*}

After VS2012, replace with $1 (.*)

Copy codeThe Code is as follows:
HospitalID = Request. QueryString ["hospital"];
Required mentid = Request. QueryString ["department"];

Copy codeThe Code is as follows:
/// <Summary>
/// Product code
/// </Summary>

// Replace the following statement
[DisplayName ("Product Code")]

Delete blank rows using regular expressions in vs2008

The regular expression should be like this structure: [starting with a line] [any blank character] [line break]

The value corresponding to each regular table is ^: B * \ n.

^ Indicates the beginning of a row.
: B represents a blank character
* Represents any character, while B * represents any blank character.
\ N indicates a line break

Procedure

1. Press ctrl + H to bring up the quick replacement window.
2. If you enter this field, click "replace ".

In editplus

Replace \ n with \ n. If not, it indicates that there are other characters in the blank line. You can refer to the following regular expression.

Copy codeThe Code is as follows:
^ [\ S \ S] * \ n

You may leave a message if you need to replace it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.