I tried that one even for bristleworms and it didn't work too well. The inverted bottle trick could work if it's small enough. Another easy way is to put a glass next to the rockwork with a piece of shrimp. The crab will try to get in, fall in, and it's too slippery for it to climb out.