ACL - How to remove string with forward slashes?
Objective is to remove a specific string with special characters from a file programmatically.
The problem experienced is, everything leading up to the forward slash I can remove, as soon as i include a forward slash in the $stringToRemove variable, the program fails to perform a substitution with the value "test". Ultimately i will replace "test" with an empty space. Lack of debugging tools makes this a bit tricky to solve.
# $stringToRemove = '<!string1 % string2 "string3//string4/string5"> %string6; '
$Double_Quote_Symbol = chr(34)
$Percent_Symbol = chr(37)
$Forward_Slash_Symbol = chr(47)
$stringToRemove = "string1 " . $Percent_Symbol . "string2" . $Double_Quote_Symbol . "string3//string4/string5"
execute("substitute -a -c -noe -ws -noq /" . $stringToRemove . "/test")
Note: this is performed on an XML file opened as a text file using "edit -untagged"
I've attempted:
1) using the decimal value of a forward slash to ensure it is recognized as a string value rather than a built in special function using chr().
2) using the quote() function in attempt to return the string value rather than built in functions reading the forward slash in a string incorrectly. Unsuccessful.
$stringToRemove = quote('<!string1 % string2 "string3//string4/string5"> %string6;')
3) building the string piece by piece and escaping the forward slash with a backslash which did not work for me. example:
$stringToRemove = $string1 . $string2 . $string 3 . "\/\/" . $string4
I noticed in the 'substitute' docs that ACL may perform essentially a tag balancing check. Does ACL interpret this forward slash in a string and expecting it to be the end tag and ffails because of this? All I hope to accomplish is to ensure this string can be programmatically removed.

