I agree with Chris. Rosemary will continue to grow from the base (usually branching off) of the branch if it is cut.

For basil, when you start to get the white blooms, clip them off, this will keep the basil from going to seed and dying before you are done with it. Every year I have my garden full of basil! Italian cooking all through the summer and even into the fall with fresh basil! (at least for where I live here in TX)