Regular expression--commonly used replacement by Intellij IDEA

Original URL: Regular Expressions - Commonly used replacements in Intellij IDEA - Programmer Sought

Introduction

This article introduces some commonly used examples when IDEA uses regular expressions for replacement.

Annotate with annotations

need

Will

/**
 * abc
 */

Change to:

/**
 * abc
 */
@ApiModelOperation("abc")

method

Select the regular expression mode (replace the ".*" button inside)

search

(\/\*\*
     \* )(.+)(
     \*\/)

replace

$1$2$3
    @ApiModelProperty("$2")

Guess you like

Origin blog.csdn.net/feiying0canglang/article/details/128143800