English 中文(简体)
添加插图
原标题:Add quotation at the start and end of each line in Notepad++

我有一份名单(在一份档案中),我要迅速改写到 Java本·Syntax,因此我想采取以下行动:

AliceBlue
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond

and convert it to an array literal...

var myArray = ["AliceBlue", "AntiqueWhite", ... ]

我在附注pad++中列出了清单,而且我需要作一个分类表述,在线路和<代码>开始时添加<><>>>>>>>>>>>,在末尾删除“条码”栏目。 我对雷特感到可怕。

我常常必须履行这些任务,以便知道如何做,这对我来说是一个巨大好处。 很多人

最佳回答

你们赢得一定的能力,只能做一次替换;你不得不采取一些步骤。 这里我是怎样做的:

  1. Find(经常表达方式):

    (.+)
    

    改为:

    "1"
    

    这增加了以下引文:

    "AliceBlue"
    "AntiqueWhite"
    "Aqua"
    "Aquamarine"
    "Azure"
    "Beige"
    "Bisque"
    "Black"
    "BlanchedAlmond"
    
  2. Find(以延伸方式):

    
    
    

    改为(在 com后没有显示的空间):

    , 
    

    这把线路转换成按ma分列的清单:

    "AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond"
    

  3. 增加<代码>var myArray = 转让和薄膜:

    var myArray = ["AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond"];
    
问题回答
  • One simple way is replace (newline) with ","(double-quote comma double-quote) after this append double-quote in the start and end of file.

example:

      AliceBlue
      AntiqueWhite
      Aqua
      Aquamarine
      Beige
  • Replcae with ","

      AliceBlue","AntiqueWhite","Aqua","Aquamarine","Beige
    
  • 现在是“(双重)”的开端和终点。

     "AliceBlue","AntiqueWhite","Aqua","Aquamarine","Beige"
    

If your text contains blank lines in between you can use regular expression + instead of

example:

      AliceBlue

      AntiqueWhite
      Aqua


      Aquamarine
      Beige
  • Replcae + with "," (in regex mode)

      AliceBlue","AntiqueWhite","Aqua","Aquamarine","Beige
    
  • 现在是“(双重)”的开端和终点。

     "AliceBlue","AntiqueWhite","Aqua","Aquamarine","Beige"
    

注++

  1. Press CTRL+H
  2. Replace ^ with (sign you want append at the start)
  3. Select search mode as Regular Expression
  4. Click Replace All

在附注pad++中,将任何东西加价

  1. Press CTRL+H
  2. Replace $ with (sign you want to append at the end)
  3. Select search mode as Regular Expression
  4. Click Replace All

Ex: After performing above steps AHV01 replaced with AHV01

欢庆!

感谢。

  1. Put your cursor at the begining of line 1.
  2. click Edit>ColumnEditor. Put " in the text and hit enter.
  3. Repeat 2 but put the cursor at the end of line1 and put ", and hit enter.

我正在视窗10使用8.1.9.2 64bit,更换程序可以一步完成,尝试:

Find what: (.+)

改为:“1”,

注:选择了环绕和定期明示选择。

那么,你仍然需要在你的法典中以手工方式补充。

感谢!

  • Place your cursor at the end of the text.
  • Press SHIFT and ->. The cursor will move to the next line.
  • Press CTRL-F and type , in "Replace with:" and press ENTER.

你需要在您的第一份案文的开始和最后一份案文的结尾处引用。





相关问题
Uncommon regular expressions [closed]

Recently I discovered two amazing regular expression features: ?: and ?!. I was curious of other neat regex features. So maybe you would like to share some tricky regular expressions.

regex to trap img tag, both versions

I need to remove image tags from text, so both versions of the tag: <img src="" ... ></img> <img src="" ... />

C++, Boost regex, replace value function of matched value?

Specifically, I have an array of strings called val, and want to replace all instances of "%{n}%" in the input with val[n]. More generally, I want the replace value to be a function of the match ...

PowerShell -match operator and multiple groups

I have the following log entry that I am processing in PowerShell I m trying to extract all the activity names and durations using the -match operator but I am only getting one match group back. I m ...

Is it possible to negate a regular expression search?

I m building a lexical analysis engine in c#. For the most part it is done and works quite well. One of the features of my lexer is that it allows any user to input their own regular expressions. This ...

regex for four-digit numbers (or "default")

I need a regex for four-digit numbers separated by comma ("default" can also be a value). Examples: 6755 3452,8767,9865,8766,3454 7678,9876 1234,9867,6876,9865 default Note: "default" ...

热门标签