-3

I would like to remove a minus character before different numbers in a chain.

  1. What I currently have

Percentage="-10000000000.00" Percentage="-999999.00" Percentage="-100000.00" Percentage="-52222222.00"

  1. Expected

Percentage="10000000000.00" Percentage="999999.00" Percentage="100000.00" Percentage="52222222.00"

  • Does this answer your question? [Reference - What does this regex mean?](https://stackoverflow.com/questions/22937618/reference-what-does-this-regex-mean) – AdrianHHH Feb 21 '23 at 22:02

4 Answers4

0

Use Find and Replace (Ctrl + H)

So find: ="-

Replace with ="

the Power of Replace

Should then give you want you want based on your input / output cases listed.

Tom Ruyter
  • 176
  • 2
  • 9
0

I found this one:

search: Percentage="-(\d+\.\d+)"
replace: Percentage="$1"
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
0

I suggest the following find and replace in regex mode:

Find:    Percentage="-(\d+(?:\.\d+)?)"
Replace: Percentage="$1"
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
0

You can search for the following regex with a lookahead pattern that matches a minus character that is followed by a digit:

-(?=\d)

And replace it with nothing.

blhsing
  • 91,368
  • 6
  • 71
  • 106