Home > OS >  Notepad Transforme all content inside curly bracket into one line
Notepad Transforme all content inside curly bracket into one line

Time:05-17

I would like to transform all content inside curly bracket into one line, using notepad .

Before

    [10.10.10.10] => {
    "out_hosts.stdout": " text"
}
    [10.10.10.11] => {
    "out_hosts.stdout": " text"
}
    [10.10.10.12] => {
    "out_hosts.stdout": " text"
}

After

  [10.10.10.10] => {"out_hosts.stdout": " text"}
  [10.10.10.11] => {"out_hosts.stdout": " text"}
  [10.10.10.12] => {"out_hosts.stdout": " text"}

Thanks

CodePudding user response:

Your could try this:

  • Find what: {\s*(.*?)\s*}
  • Replace with: {\1}
  • Mode: Regular expression

enter image description here

CodePudding user response:

This code should work..

Find: (?<={)\n(.*?)\n

Replace all: $1

  • Related