Проблема с парсингом строки



  • Проблема с парсингом строчки.
    "1;0;Сбербанк России;1481;Москва и обл.;13 744 283 098,00;44,22%;12 958 977 146,00;45,32%;785 305 952,00;6,06"

    Ряд значений парсятся неправильно. Например, вместо 44,22% парсится 00.Может символ % портит?
    Как распарсить правильно?
    Прилагаю код

    BAS:[{"name":"","code":"/*Dat:eyJzIjoiaHR0cGNsaWVudGdldCIsInYiOjEsImYiOltdLCJ1dyI6IjAiLCJ1dCI6IjAiLCJ1dG8iOiIwIiwidW0iOiIwIiwiZCI6W3siaWQiOiJWYWx1ZSIsInR5cGUiOiJjb25zdHIiLCJkYXRhIjoiaHR0cHM6Ly93d3cuYmFua2kucnUvYmFua3MvcmF0aW5ncy9leHBvcnQucGhwP1BST1BFUlRZX0lEPTYwJnNlYXJjaFt0eXBlXT1uYW1lJnNvcnRfcGFyYW09cmF0aW5nJnNvcnRfb3JkZXI9QVNDJlJFR0lPTl9JRD0wJmRhdGUxPTIwMjAtMDUtMDEmZGF0ZTI9MjAxOS0wNS0wMSZJU19TSE9XX0xJQUJJTElUSUVTPTEiLCJjbGFzcyI6InN0cmluZyJ9LHsiaWQiOiJIZWFkZXJzIiwidHlwZSI6ImNvbnN0ciIsImRhdGEiOiIiLCJjbGFzcyI6InN0cmluZyJ9LHsiaWQiOiJNZXRob2QiLCJ0eXBlIjoiY29uc3RyIiwiZGF0YSI6IkdFVCIsImNsYXNzIjoic3RyaW5nIn0seyJpZCI6IkNoZWNrIiwidHlwZSI6ImNoZWNrIiwiZGF0YSI6dHJ1ZX1dfQ==*/\n_switch_http_client_main()\nhttp_client_get2(\"https://www.banki.ru/banks/ratings/export.php?PROPERTY_ID=60\\u0026search[type]=name\\u0026sort_param=rating\\u0026sort_order=ASC\\u0026REGION_ID=0\\u0026date1=2020-05-01\\u0026date2=2019-05-01\\u0026IS_SHOW_LIABILITIES=1\",{method:(\"GET\"),headers:(\"\")})!","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":0,"id":373830458,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""},{"name":"","code":"/*Dat:eyJzIjoiaHR0cGNsaWVudGNvbnRlbnQiLCJ2IjoxLCJmIjpbXSwidXciOiIwIiwidXQiOiIwIiwidXRvIjoiMCIsInVtIjoiMCIsImQiOlt7ImlkIjoiU2F2ZSIsInR5cGUiOiJ2YXIiLCJkYXRhIjoiU0FWRURfQ09OVEVOVCJ9LHsiaWQiOiJFbmNvZGluZyIsInR5cGUiOiJjb25zdHIiLCJkYXRhIjoid2luZG93cy0xMjUxIiwiY2xhc3MiOiJzdHJpbmcifV19*/\n_switch_http_client_main()\nVAR_SAVED_CONTENT = http_client_encoded_content(\"windows-1251\")","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":0,"id":425979932,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""},{"name":"","code":"/*Dat:eyJzIjoiZmlsZXN5c3RlbV93cml0ZWZpbGUiLCJ2IjoxLCJmIjpbXSwidXciOiIwIiwidXQiOiIwIiwidXRvIjoiMCIsInVtIjoiMCIsImQiOlt7ImlkIjoiRmlsZSIsInR5cGUiOiJjb25zdHIiLCJkYXRhIjoieGxzIiwiY2xhc3MiOiJzdHJpbmcifSx7ImlkIjoiVmFsdWUiLCJ0eXBlIjoiY29uc3RyIiwiZGF0YSI6IltbU0FWRURfQ09OVEVOVF1dIiwiY2xhc3MiOiJzdHJpbmcifSx7ImlkIjoiQ2hlY2szIiwidHlwZSI6ImNoZWNrIiwiZGF0YSI6ZmFsc2V9LHsiaWQiOiJDaGVjayIsInR5cGUiOiJjaGVjayIsImRhdGEiOmZhbHNlfSx7ImlkIjoiQ2hlY2syIiwidHlwZSI6ImNoZWNrIiwiZGF0YSI6ZmFsc2V9XX0=*/\nnative(\"filesystem\", \"writefile\", JSON.stringify({path: \"xls\",value: (VAR_SAVED_CONTENT).toString(),base64:false,append:false}))","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":0,"id":866759901,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""},{"name":"","code":"/*Dat:eyJzIjoiZmlsZXN5c3RlbV9maWxlX3RvX2xpc3QiLCJ2IjoxLCJmIjpbXSwidXciOiIwIiwidXQiOiIwIiwidXRvIjoiMCIsInVtIjoiMCIsImQiOlt7ImlkIjoiVmFsdWUiLCJ0eXBlIjoiY29uc3RyIiwiZGF0YSI6InhscyIsImNsYXNzIjoic3RyaW5nIn0seyJpZCI6IlNhdmUiLCJ0eXBlIjoidmFyIiwiZGF0YSI6IkxJU1RfV0lUSF9GSUxFX0NPTlRFTlQifV19*/\n{\nvar d = native(\"filesystem\", \"readfile\", JSON.stringify({value: \"xls\",base64:false,from:0,to:0}))\nVAR_LIST_WITH_FILE_CONTENT\t= (d.length == 0) ? [] : d.split(/\\r?\\n/)\n}","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":0,"id":39543096,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""},{"name":"","code":"/*Dat:eyJzIjoiUmVtb3ZlTGlzdFBhcnQiLCJ2IjoxLCJmIjpbXSwidXciOiIwIiwidXQiOiIwIiwidXRvIjoiMCIsInVtIjoiMCIsImQiOlt7ImlkIjoiVmFyaWFibGUiLCJ0eXBlIjoidmFyIiwiZGF0YSI6IkxJU1RfV0lUSF9GSUxFX0NPTlRFTlQifSx7ImlkIjoiSW5kZXhTdGFydCIsInR5cGUiOiJjb25zdHIiLCJkYXRhIjoiMCIsImNsYXNzIjoiaW50In0seyJpZCI6IkluZGV4RW5kIiwidHlwZSI6ImNvbnN0ciIsImRhdGEiOiI0IiwiY2xhc3MiOiJpbnQifV19*/\n;(VAR_LIST_WITH_FILE_CONTENT).splice(0,4)","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":0,"id":765200647,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""},{"name":"","code":"/*Dat:eyJzIjoiZm9yZWFjaCIsInYiOjEsImYiOltdLCJ1dyI6IjAiLCJ1dCI6IjAiLCJ1dG8iOiIwIiwidW0iOiIwIiwiZCI6W3siaWQiOiJGb3JBcnJheSIsInR5cGUiOiJjb25zdHIiLCJkYXRhIjoiW1tMSVNUX1dJVEhfRklMRV9DT05URU5UXV0iLCJjbGFzcyI6ImV4cHJlc3Npb24ifV19*/\n_do_with_params({\"foreach_data\":(VAR_LIST_WITH_FILE_CONTENT)},function(){\nVAR_CYCLE_INDEX = _iterator() - 1\nif(VAR_CYCLE_INDEX > _cycle_param(\"foreach_data\").length - 1)_break();\nVAR_FOREACH_DATA = _cycle_param(\"foreach_data\")[VAR_CYCLE_INDEX]\nsection_insert()\n})!","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":0,"id":930908943,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""},{"name":"","code":"/*Dat:eyJzIjoicGFyc2VsaW5lIiwidiI6MSwiZiI6W10sInV3IjoiMCIsInV0IjoiMCIsInV0byI6IjAiLCJ1bSI6IjAiLCJkIjpbeyJpZCI6IlZhbHVlIiwidHlwZSI6ImNvbnN0ciIsImRhdGEiOiJbW0ZPUkVBQ0hfREFUQV1dIiwiY2xhc3MiOiJzdHJpbmcifSx7ImlkIjoiVmFyaWFibGVzTGlzdCIsInR5cGUiOiJ2YXIiLCJkYXRhIjoicG9zX3JhdCxyYXRfaXptLGJhbmtfTkFNRSxMSUNFTlNFLFJFR0lPTixTVEFSVF9CQUxBTkNFLFNUQVJUX1BBU1NJVkUsRU5EX0JBTEFOQ0UsRU5EX1BBU1NJVkUsQkFMQU5DRV9JWk0sUEFTU0lWRV9JWk1fUFJPYyJ9XX0=*/\nvar csv_parse_result = csv_parse(VAR_FOREACH_DATA)\nVAR_POS_RAT = csv_parse_result[0]\nif(typeof(VAR_POS_RAT) == 'undefined' || !VAR_POS_RAT)\n{\nVAR_POS_RAT = \"\"\n}\nVAR_RAT_IZM = csv_parse_result[1]\nif(typeof(VAR_RAT_IZM) == 'undefined' || !VAR_RAT_IZM)\n{\nVAR_RAT_IZM = \"\"\n}\nVAR_BANK_NAME = csv_parse_result[2]\nif(typeof(VAR_BANK_NAME) == 'undefined' || !VAR_BANK_NAME)\n{\nVAR_BANK_NAME = \"\"\n}\nVAR_LICENSE = csv_parse_result[3]\nif(typeof(VAR_LICENSE) == 'undefined' || !VAR_LICENSE)\n{\nVAR_LICENSE = \"\"\n}\nVAR_REGION = csv_parse_result[4]\nif(typeof(VAR_REGION) == 'undefined' || !VAR_REGION)\n{\nVAR_REGION = \"\"\n}\nVAR_START_BALANCE = csv_parse_result[5]\nif(typeof(VAR_START_BALANCE) == 'undefined' || !VAR_START_BALANCE)\n{\nVAR_START_BALANCE = \"\"\n}\nVAR_START_PASSIVE = csv_parse_result[6]\nif(typeof(VAR_START_PASSIVE) == 'undefined' || !VAR_START_PASSIVE)\n{\nVAR_START_PASSIVE = \"\"\n}\nVAR_END_BALANCE = csv_parse_result[7]\nif(typeof(VAR_END_BALANCE) == 'undefined' || !VAR_END_BALANCE)\n{\nVAR_END_BALANCE = \"\"\n}\nVAR_END_PASSIVE = csv_parse_result[8]\nif(typeof(VAR_END_PASSIVE) == 'undefined' || !VAR_END_PASSIVE)\n{\nVAR_END_PASSIVE = \"\"\n}\nVAR_BALANCE_IZM = csv_parse_result[9]\nif(typeof(VAR_BALANCE_IZM) == 'undefined' || !VAR_BALANCE_IZM)\n{\nVAR_BALANCE_IZM = \"\"\n}\nVAR_PASSIVE_IZM_PROC = csv_parse_result[10]\nif(typeof(VAR_PASSIVE_IZM_PROC) == 'undefined' || !VAR_PASSIVE_IZM_PROC)\n{\nVAR_PASSIVE_IZM_PROC = \"\"\n}","internal_label_id":"","dat_precomputed":null,"search_precomputed":null,"code_precomputed":null,"parentid":930908943,"id":151808828,"donotexecuteduringrecord":false,"is_selected":false,"color":"","is_fold":false,"fd":""}]
    


  • @Viktor, в действии "Парсить строку" запятая считается разделителем, заменяйте запятую на точку перед парсингом, или используйте действие "Парсить Строку" из раздела "Список" там можно указать разделитель.



  • @GhostZ точно!там же перед два нуля. Спасибо!


Log in to reply