8 Nov 2006 at 22:20 #1 k++ k++ Associate Joined 5 Oct 2004 Posts 585 Location London Hi I need to split a string by the forward slash character and I am completely out of ideas. I have tried split (/[/]/, $string) however this throws an error because of an unmatched [. regards Karl
Hi I need to split a string by the forward slash character and I am completely out of ideas. I have tried split (/[/]/, $string) however this throws an error because of an unmatched [. regards Karl
8 Nov 2006 at 23:40 #2 JIMA JIMA Associate Joined 15 May 2006 Posts 224 Have you tried delimiting the / with a \ character? split ('\/',$string) Couldn't swear it'll work, but it's worth a go.
Have you tried delimiting the / with a \ character? split ('\/',$string) Couldn't swear it'll work, but it's worth a go.
8 Nov 2006 at 23:43 #3 k++ k++ Associate OP Joined 5 Oct 2004 Posts 585 Location London tried everything, but managed to make it work with '/' without any surrounding forward slashes thanks anyway.
tried everything, but managed to make it work with '/' without any surrounding forward slashes thanks anyway.