You need to sign in to do that
Don't have an account?

String Split function fails if using a dot as criteria
//this will fail reporting a size of 0 string s = 'first.second'; string[] part; part = s.split('.'); System.DEBUG(part.size()); //this will work reporting a size of 2 string s = 'first_second'; string[] part; part = s.split('_'); System.DEBUG(part.size());
I'm usign API version 20. Paste this into the Execute Anonymous window of the IDE. Anyone have any ideas?
Try this:
Split actually uses regular expressions so you have to escape the "dot" (.)
All Answers
Try this:
Split actually uses regular expressions so you have to escape the "dot" (.)
Ah Ahh. Thanks still recovering from C#