Therefore the actual value of your declared string json is "C:\test\sample. com and /dev/nul \ = back slash, like C:\Windows, and AD\Username. groovy replace forward slash in string, Well, there was a big debate on the mailing list and Groovy - replaceAll() - Replaces all occurrences of a captured group by the result of a closure on that text. The important point you need to note is that a single \\ is substituted as single backslash i. the first column is a filepath that i read in as a string. Groovy extract substring before character. Let’s say the following is our string − const str = 'Th/s str/ng /conta/ns some/ forward slas/hes' home > topics > php > questions > how to replace backslash Replacing a backslash with a forward slash in Javascript. As the forward slash (/) is special character in regular expressions, it has to be escaped with a backward slash (\). Groovy replace backslash with forward slash Thank you.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |