Some cramps are expected in
pregnancy due to hormonal changes,
gas, constipation etc. If you have a tipped or retroverted uterus then this can also cause pain. It can also be due to infection. Any sharp pain in the abdomen can be due to gas, threatened abortion, infection or due to unrelated causes such as kidney or gall bladder stones.
In your case since it has been happening for last so many weeks, it must be gas.