.split() function not handling multiple charcters

I’m going to assume this isn’t expected behavior. It’s a bit strange:

Icinga 2 (version: r2.10.4-1)
Type $help to view available commands.
<1> => test = "my.happy.domain.edu"
null
<2> => test.split(".")
[ "my", "happy", "domain", "edu" ]
<3> => test.split("app")
[ "my.h", "", "", "y.dom", "in.edu" ]

It treats each individual character in the provided string as something to remove/separate. I was expecting it to behave more or less like the .split() function in Python. Wanted to check if this was expected behavior before submitting a bug on github.

Sorry to submit this during 2.11 hell D:

Hi,

an issue is a good idea. The code starts here in case you want to start looking by yourself - I’m back on Monday :wink:

Cheers,
Michael

If C++ lands in my skillset, I’ll start helping out. For now, I’m going to be a hipster and learn Rust.

https://github.com/Icinga/icinga2/issues/7202 Going to resolve this thread since ticket is open.