Hello guys its pleasure to be a member and I have a question. .
Recently I have got an elegant racer snake and its almost 50cm tall and its been with me now for almost a month without eating anything and all it think of is escaping. I did try to get all kind of food that I would believe that it would eat... but without any use. What I did try to feed it is:
1- Pinky ( small mouse)
2- live small fish
3- bird egg
And non of that it did eve eat... while its moving alot. can anyone please help me and tell me what to do??

This species is restricted to warm biotopes where it is found in hard, light desert soil and gravel desert. It is not found in rocky areas or in sandy dunes. It feeds on small rodents and lizards, and can be found in rodent burrows. Gasperetti (1988) indicates that this species is nocturnal, however diurnal activity has been observed in Israel (Babocsay et al. 2009) and it may be the case that activity patterns in this snake are linked to local climatic factors (Y. Werner pers. comm. June 2012)

Notice it is not adapted to SAND. But rather hard compacted soil or gravel... fine gravel. It looks like you have aquarium sand in the tank?

Experiment with different substrates, including a clay based soil or something that cakes hard after it dries out from moisture. Dirt from your local field ...baked in the oven to sterilize at 300-350 F for 15 minutes to kill any bacteria / parasites / mites etc.

Offer 2 or 3 hides ... a rock hide made of plastic ...maybe a plastic plumbing pipe... a cardboard tube... partially buried on 1 end to simulate a burrow. Possibly a larger enclosure might be required.

more images are on Google ...look at this type of pebble sand
substrate

I dont know yet what your temps are but you can simulate the average temps from this graph... you can even simulate a hibernation period in the winter and increase the chances of it eating as you raise temps...slowly 1 or 2 degrees C a week after the winter period... you can manipulate temps weekly ...lower ... then a month later bring them up to a weather condition...and finally a summer peak. I am not suggesting cooking the snake at 40-44 C C but find a happy medium for a hot spot. Turn off the lights at night to simulate a night temp drop. But keep a heat pad under the glass stuck to the tank to maintain a warm area if needed.

Finally... from my experience I have snakes that do this same behavior during the spring USA months ...especially the males. They refuse to eat and are constantly on the move as if to escape. They are actually actively looking for a mate. There is nothing I can do to make them eat or stop the search...finally after a few weeks they settle down again and eat readily.

There is little information about this exact species ...but you can compare it to other racer species for more insight.

You may want to try offering lizards as well as the other food you have offered. I have kept Southern Black Racers and Eastern Coachwhip snakes, both belonging to genus Coluber. Granted these are very different racers than what you have.

Due to the lack of extensive information on your species compared to kingsnakes, ball pythons, and other common herps, I am going to guess it might be WC or from WC parents. If that is the case, while they may eat rodents, most WC or 1st gen captives that have lizards, frogs, or snakes in their diet - as well as mice - will typically prefer and only take lizards, frogs, or snakes.
People can get captive bred and born Southern Black Racers to eat mice. All mine have always been WC or 1st gen captives and would only take lizards and nothing else.

An idea to mimic a mouse burrow that I have used with Mole Kingsnakes is submerge a narrow PVC pipe or paper-towel tube into the substrate. In addition, add more rock hides and fake/real foliage to the surface to add to a sense of security. Many snakes of all species refuse food if they feel insecure.

Also with the male mating response. Some North American Colubrids also engage in the food-strike during winter from November until February. They seek a hibernating/brumating female in her retreat during winter, wait with her, and when spring comes will mate with her as her activity picks back up.