Page 1 of 1

Problem with backslash character \

Posted: Mon Aug 02, 2021 4:18 pm
by Krzysztof Mycek
I have a question because I can’t find any information about my problem.
I need to separare part od path included in the XML file and metadata, witch is like for example: 0450-06-2021\karton.pdf. I need only part before \ character 0450-06-2021. Unfortunately when I use funcion Before \, this character is not recognized.
Do You have some idea how I can get only part before backslash?

My XML file is like:


<?xml version="1.0" encoding="UTF-8"?>
<Positions>
<Position>
<position_id>124519</position_id>
<order_id>25069</order_id>
<client_name/>
<width unit="cm">100.00</width>
<height unit="cm">100.00</height>
<surface_name>BACKLIT FLASH; 1800X2400;</surface_name>
<color_name>brak</color_name>
<printer_machine_name>FABRI</printer_machine_name>
<file_path root_path="\192.168.1.193\DTP2">0450-06-2021\karton.pdf</file_path>
</Position>
</Positions>

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:22 pm
by jan_suhr
Have you tried to escape it, \\

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:32 pm
by Krzysztof Mycek
Hi Jan
Unfortunately not working too. I try to use many combination.

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:37 pm
by jan_suhr
Then try \/
Switch can for paths "normalize" slashes to be working on both platforms.

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:41 pm
by Krzysztof Mycek
Any combination not working.
\/ no
\\ no
// no
"\\" no
ect ect

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:44 pm
by jan_suhr
In the search field you can use Regular expressions to pickup parts from your variable value. That way would probably solve the problem.

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:47 pm
by Krzysztof Mycek
Maybe that is the solutions but a little complicated.
Thank You Jan. Maybe someone else will have an idea and face such a problem

Re: Problem with backslash character \

Posted: Mon Aug 02, 2021 4:56 pm
by Krzysztof Mycek
That is the solution: ^(\d{4}[- ]\d{2}[- ]\d{4})|()$
Of course only for this case.

Re: Problem with backslash character \

Posted: Wed Aug 04, 2021 4:31 pm
by laurentd
Another solution: use the StringSplitter app with separator \
The result will be in private data Split.Part1
https://www.enfocus.com/en/appstore/pro ... ngsplitter