How can I remove the pipe character in product tags using liquid?

Hi Community,

I want to output a information from my product tags. In my tags I have the following tag

Inhalt (ml)|750

I want to display only 750

So I try the following:

{% for tag in product.tags %}
            	{% if tag contains 'Inhalt' %}

            		{%  assign myTag = tag | remove: "Inhalt \(ml\)" %}
            		

{{ myTag }}

           
            
            	{% endif %}
            {% endfor %}

So now I have |750 but for me it is not possible to remove the pipe charakter with liquid.

I also try this

{%  assign myTag = tag | remove: "Inhalt \(ml\)\|" %}

also slice not working here :disappointed_face: Very confusing