If we want to Replace the value in twig template then we have an example and syntax, please have a look..
{#
**** replace '-' with '$' sign in vidyard ID ****
#}
{% set twig_content_variable = node.field_resources_vidyard_id.value %} // here we are applying on field_resources_vidyard_id field..
{% set replace_value_var = '-' %}
{% set replace_with_value_var = '$' %}
{%if twig_content_variable %}
{% set vidyard_function_id = twig_content_variable|replace({ '-': '$' }) %}
{% endif %}
Note: If have any suggestions or issue regarding 'Replace any string or value in twig template variable.' then you can ask by comments.
{#
**** replace '-' with '$' sign in vidyard ID ****
#}
{% set twig_content_variable = node.field_resources_vidyard_id.value %} // here we are applying on field_resources_vidyard_id field..
{% set replace_value_var = '-' %}
{% set replace_with_value_var = '$' %}
{%if twig_content_variable %}
{% set vidyard_function_id = twig_content_variable|replace({ '-': '$' }) %}
{% endif %}
Note: If have any suggestions or issue regarding 'Replace any string or value in twig template variable.' then you can ask by comments.