mirror of
https://github.com/sasjs/core.git
synced 2026-01-10 10:50:04 +00:00
fix: using findc instead of regex for faster parsing
This commit is contained in:
18
all.sas
18
all.sas
@@ -8441,11 +8441,7 @@ options
|
|||||||
format _numeric_ bart.;
|
format _numeric_ bart.;
|
||||||
%do i=1 %to &numcols;
|
%do i=1 %to &numcols;
|
||||||
%if &&typelong&i=char or &fmt=Y %then %do;
|
%if &&typelong&i=char or &fmt=Y %then %do;
|
||||||
if prxmatch(
|
if findc(&&name&i,'"\'!!'0A0D09000E0F01021011'x) then do;
|
||||||
'm/\"|\x0A|\x0D|\x09|\x00|\x0E|\x0F|\x01|\x02|\x10|\x11|\\/o',
|
|
||||||
&&name&i
|
|
||||||
)>0
|
|
||||||
then do;
|
|
||||||
&&name&i='"'!!trim(
|
&&name&i='"'!!trim(
|
||||||
prxchange('s/"/\\"/',-1, /* double quote */
|
prxchange('s/"/\\"/',-1, /* double quote */
|
||||||
prxchange('s/\x0A/\n/',-1, /* new line */
|
prxchange('s/\x0A/\n/',-1, /* new line */
|
||||||
@@ -14974,11 +14970,7 @@ data _null_;
|
|||||||
put ' format _numeric_ bart.; ';
|
put ' format _numeric_ bart.; ';
|
||||||
put ' %do i=1 %to &numcols; ';
|
put ' %do i=1 %to &numcols; ';
|
||||||
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
||||||
put ' if prxmatch( ';
|
put ' if findc(&&name&i,''"\''!!''0A0D09000E0F01021011''x) then do; ';
|
||||||
put ' ''m/\"|\x0A|\x0D|\x09|\x00|\x0E|\x0F|\x01|\x02|\x10|\x11|\\/o'', ';
|
|
||||||
put ' &&name&i ';
|
|
||||||
put ' )>0 ';
|
|
||||||
put ' then do; ';
|
|
||||||
put ' &&name&i=''"''!!trim( ';
|
put ' &&name&i=''"''!!trim( ';
|
||||||
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
||||||
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
||||||
@@ -20473,11 +20465,7 @@ data _null_;
|
|||||||
put ' format _numeric_ bart.; ';
|
put ' format _numeric_ bart.; ';
|
||||||
put ' %do i=1 %to &numcols; ';
|
put ' %do i=1 %to &numcols; ';
|
||||||
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
||||||
put ' if prxmatch( ';
|
put ' if findc(&&name&i,''"\''!!''0A0D09000E0F01021011''x) then do; ';
|
||||||
put ' ''m/\"|\x0A|\x0D|\x09|\x00|\x0E|\x0F|\x01|\x02|\x10|\x11|\\/o'', ';
|
|
||||||
put ' &&name&i ';
|
|
||||||
put ' )>0 ';
|
|
||||||
put ' then do; ';
|
|
||||||
put ' &&name&i=''"''!!trim( ';
|
put ' &&name&i=''"''!!trim( ';
|
||||||
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
||||||
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
||||||
|
|||||||
@@ -199,11 +199,7 @@
|
|||||||
format _numeric_ bart.;
|
format _numeric_ bart.;
|
||||||
%do i=1 %to &numcols;
|
%do i=1 %to &numcols;
|
||||||
%if &&typelong&i=char or &fmt=Y %then %do;
|
%if &&typelong&i=char or &fmt=Y %then %do;
|
||||||
if prxmatch(
|
if findc(&&name&i,'"\'!!'0A0D09000E0F01021011'x) then do;
|
||||||
'm/\"|\x0A|\x0D|\x09|\x00|\x0E|\x0F|\x01|\x02|\x10|\x11|\\/o',
|
|
||||||
&&name&i
|
|
||||||
)>0
|
|
||||||
then do;
|
|
||||||
&&name&i='"'!!trim(
|
&&name&i='"'!!trim(
|
||||||
prxchange('s/"/\\"/',-1, /* double quote */
|
prxchange('s/"/\\"/',-1, /* double quote */
|
||||||
prxchange('s/\x0A/\n/',-1, /* new line */
|
prxchange('s/\x0A/\n/',-1, /* new line */
|
||||||
|
|||||||
@@ -232,11 +232,7 @@ data _null_;
|
|||||||
put ' format _numeric_ bart.; ';
|
put ' format _numeric_ bart.; ';
|
||||||
put ' %do i=1 %to &numcols; ';
|
put ' %do i=1 %to &numcols; ';
|
||||||
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
||||||
put ' if prxmatch( ';
|
put ' if findc(&&name&i,''"\''!!''0A0D09000E0F01021011''x) then do; ';
|
||||||
put ' ''m/\"|\x0A|\x0D|\x09|\x00|\x0E|\x0F|\x01|\x02|\x10|\x11|\\/o'', ';
|
|
||||||
put ' &&name&i ';
|
|
||||||
put ' )>0 ';
|
|
||||||
put ' then do; ';
|
|
||||||
put ' &&name&i=''"''!!trim( ';
|
put ' &&name&i=''"''!!trim( ';
|
||||||
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
||||||
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
||||||
|
|||||||
@@ -376,11 +376,7 @@ data _null_;
|
|||||||
put ' format _numeric_ bart.; ';
|
put ' format _numeric_ bart.; ';
|
||||||
put ' %do i=1 %to &numcols; ';
|
put ' %do i=1 %to &numcols; ';
|
||||||
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
put ' %if &&typelong&i=char or &fmt=Y %then %do; ';
|
||||||
put ' if prxmatch( ';
|
put ' if findc(&&name&i,''"\''!!''0A0D09000E0F01021011''x) then do; ';
|
||||||
put ' ''m/\"|\x0A|\x0D|\x09|\x00|\x0E|\x0F|\x01|\x02|\x10|\x11|\\/o'', ';
|
|
||||||
put ' &&name&i ';
|
|
||||||
put ' )>0 ';
|
|
||||||
put ' then do; ';
|
|
||||||
put ' &&name&i=''"''!!trim( ';
|
put ' &&name&i=''"''!!trim( ';
|
||||||
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
put ' prxchange(''s/"/\\"/'',-1, /* double quote */ ';
|
||||||
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
put ' prxchange(''s/\x0A/\n/'',-1, /* new line */ ';
|
||||||
|
|||||||
Reference in New Issue
Block a user