replace - Numbers & escape characters for regex replacement in Notepad++ -


i'm trying match pattern using regex in notepad++, not having luck. i'm able match part not of it.

i need search line:

    <size value="large" pax="13074"/> 

and replace this:

    <size value="very_large" pax="41450"  cargo="largest" cargovolume="3227"/> 

essentially need find patterns matching pax="n"/> , replace them pax="n" cargo="largest" cargovolume="0"/> while retaining initial value of n.

so, ideas anyone?

press ctrl + f, move tab replace, in find what do: pax="(\d+)" , in replace with put this: pax="\1" cargo="largest" cargovolume="0"

remember mark regex. should retain number , replace content.

update: hint saving text replacement.

whenever use regex text replacement, wrap content want save in parenthesis , can access them using \i i order of appearance of parenthesis starting @ 1.

hope helps!


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -