I’was trying to pack all required replaces in a sole line with jrepl, this is the code I’ve now:
call “%Curdir%[TOOLS]jrepl.bat” “xE2x80x9D xE2x80x9C” “x22x22 x22x22″ /x /l /t ” ” /f “%Curdir%%marca%Consolidado-OK.csv” /o –
call “%Curdir%[TOOLS]jrepl.bat” “xE2x80x93 xE2x80x94” “- -” /x /l /t ” ” /f “%Curdir%%marca%Consolidado-OK.csv” /o –
call “%Curdir%[TOOLS]jrepl.bat” “xE2x80x99” “‘” /x /f “%Curdir%%marca%Consolidado-OK.csv” /o –
call “%Curdir%[TOOLS]jrepl.bat” “xE2x84xA2” “(TM)” /x /f “%Curdir%%marca%Consolidado-OK.csv” /o –
call “%Curdir%[TOOLS]jrepl.bat” “xC2xB0″ ” grados” /x /f “%Curdir%%marca%Consolidado-OK.csv” /o –
call “%Curdir%[TOOLS]jrepl.bat” “xC3xA1 xC3xA9 xC3xAD xC3xB3 xC3xBA xC3xB1” “a e i o u n” /x /l /t ” ” /f “%Curdir%%marca%Consolidado-OK.csv” /o –
call “%Curdir%[TOOLS]jrepl.bat” “xC3x81 xC3x89 xC3x8D xC3x93 xC3x9A xC3x91” “A E I O U N” /x /l /t ” ” /f “%Curdir%%marca%Consolidado-OK.csv” /o –
And the following is the code I what the above to be replaced by:
set “reemplazos=xE2x80x9D xE2x80x9C=x22x22 x22x22#xE2x80x93 xE2x80x94=- -#xE2x80x99=’#xE2x84xA2=(TM)#xC2xB0= grados#xC3xA1 xC3xA9 xC3xAD xC3xB3 xC3xBA xC3xB1=a e i o u n#xC3x81 xC3x89 xC3x8D xC3x93 xC3x9A xC3x91=A E I O U N”
<- is used to separate each search/replace content in the string reemplazos.
call “%CurDir%[TOOLS]jrepl.bat” “%reemplazos%” “$txt=$0.replace(/(?<=#)?([^#]+)(?=#)?/g,function(m,g1){return g1.split(‘=’)[1]})” /jq /t “#” /x /f “%CurDir%%marca%Consolidado-OK.csv” /o –
I always get the error:
JScript runtime error: Mismatched search and replace /T expressions
thanks in advance!
What did you try and what were you expecting?
This is explained in the above paraghaph…
Mikel Urbieta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1