Fixed regex for weight and updated code-behind file for change done to weight

#173