0
I have difficulties with regex. I just need to split an input string.
Input: "arg1 arg2 arg3 arg4"; Output: [arg1, arg2, arg3, arg4]
Input: "arg1 'arg 2' arg3 arg4"; Output: [arg1, arg 2, arg3, arg4]
My problem is in the second example. Because when the argument is in quotes, I need to keep it integrated. And as I’m using the PHP explodes function, I end up having two arguments ([arg, 2]
);
Is php via command line?
– rray