E
E
endenwer2018-07-25 20:30:14
Regular Expressions
endenwer, 2018-07-25 20:30:14

How to split a string using spaces except those in quotes?

There is a line:

command run --first-arg="something here" --second-arg="something here" --last-arg

How can I use a regular expression to split this line into the following lines:
command
run 
--first-arg="something here"
--second-arg="something here" 
--last-arg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-07-25
@endenwer

for example, so https://ideone.com/4sFjXx
you would specify the language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question