Fill two dynamic divs inside one

I have two divs inside one parent div.
I want the right div always stick to right and expand to the left if content inside is longer;
I want the left div to fill the remain part (content inside will be hidden)

I have done the research, but in all the similar questions, one div has a fixed width, whereas in my case, both are dynamic (one based on content, the other one based on the other div).

I can use javascript to dynamically change the width of left div, but is there a pure CSS way to achieve that?

One way I can think of is using display: table-cell on the child divs. Note that even though the right div doesn't have a fixed width, its content must, so the right div can expand and the left div can take the remaining space.