1

i have problem i'm using Notepad++ and i wat to change commas to dot in specific line.

exemple :

<KEYFRAME TIME="10" >
<WEIGHT>0,4774</WEIGHT>
    </KEYFRAME>
</TRACK>
<TRACK NUMKEYFRAMES="301" MORPHNAME="blink,Right,Upper,Clamped">
<KEYFRAME TIME="0" >
<WEIGHT>0,396841</WEIGHT>
    </KEYFRAME>
<KEYFRAME TIME="0,0333333" >
<WEIGHT>0,396841</WEIGHT>
    </KEYFRAME>

This is exemple of the code i have on my files ( it is in XML readable ). What i want to do is at every line that have MORPHNAME= I want to change commas to dot

line will become

<TRACK NUMKEYFRAMES="301" MORPHNAME="blink.Right.Upper.Clamped">

but only on these line. i Look so many site / questioni have can found and no one talked about that. the best have found is how remove after specific charactère and not found how to found something on line that are regular expression to change.

Toto
  • 17,001
  • 56
  • 30
  • 41
Underskys
  • 13
  • 3
  • It is unclear what you are asking. Please [edit] the question and include the line exactly as you want it after the change. (line will become ") is not sufficient explanation. – DavidPostill Apr 12 '20 at 15:36

1 Answers1

1
  • Ctrl+H
  • Find what: (?:MORPHNAME="|\G)\w+\K,
  • Replace with: .
  • CHECK Match case
  • CHECK Wrap around
  • CHECK Regular expression
  • UNCHECK . matches newline
  • Replace all

Explanation:

(?:                 # non capture group
    MORPHNAME="     # literally
  |               # OR
    \G              # restart from last match position
)                   # end group
\w+                 # 1 or more word character
\K                  # forget all we've seen until this position
,                   # a comma

Screenshot (before):

enter image description here

Screenshot (after):

enter image description here

Toto
  • 17,001
  • 56
  • 30
  • 41