Q: Reg expression to accept values between 1 and 48? I want a Reg expression to accept values within the range [1-48].

A: You could try this regular expression: ^0*(?:[1-9]|[1-3][0-9]|4[0-8])$
However, I'd advice using another mechanism for numeric validation if possible. Regular expressions are meant to match string patterns, as already pointed out in the comments.
Here's an explanation of the regex part by part: 


*

*^: Beginning of string

*0*: Match any leading 0's

*(?: : Grouping the ORs (non-capturing group)

*

*[1-9]: Match 1 to 9


*|: OR

*

*[1-3][0-9]: Matches 10 to 39


*|: OR

*

*4[0-8]: Matches 40 to 48


*) : Ends grouping the ORs

*$: End of string


See it working in this RegExr.
Some resources you might find useful to assist desiging/testing them yourself in the future:


*

*Tutorial on regular expressions

*Online Regex testing tools: RegExr or RegexPlanet.


A: I am not understood why you using regEx for this. You can directly say 
if( x >= 1 && x <=48) {
   // x will fall in range[1-48] inclusive
}

