Для значений (translate
вернет строку с несколькими строками, тогда как tokenize
вернет список строк):
translate(replace(replace(replace(replace(substring-before(normalize-space(//description)," [more"), "\[(.*?)\]:", ";")," ; ",";")," ;",""),"; ",""),";",codepoints-to-string(10))
tokenize(replace(replace(replace(replace(substring-before(normalize-space(//description)," [more"), "\[(.*?)\]:", ";")," ; ",";")," ;",""),"; ",""),";")
Вывод:
2UW01AA
HP 14.1 Business Sleeve
Business
14.1"
Polyester
Black
Для ключи:
translate(substring-before(substring-after(replace(normalize-space(//description),"\]: (.+?) \[",";"),"["),"]"),";",codepoints-to-string(10))
tokenize(substring-before(substring-after(replace(normalize-space(//description),"\]: (.+?) \[",";"),"["),"]"),";")
Вывод:
Партиден номер
Номер на модела
Line
Screen size
Material
Color
Dimensions
Примечание: конечно, предыдущие выражения можно было бы значительно оптимизировать.