I need to improve the following Regex to add two conditions: it should not allow "00" (or any number of leading zeros) and neither should it allow "1..." (only one decimal after a whole number). For instance, an user can click "0" twice, but only one "0" would be allowed. The same with the operators: an user can click "+-" (or any combination thereof) but only "-" would be allowed. Same with "..", etc. This should not apply to numbers (1233388479223 can be allowed).
this.setState(prevState => ({
  value: `${prevState.value}${result}`.replace(/([\/\+-/*=])([\/\+\-\*=])/gi, '$2')
}))
Calculator code
class Calculator extends Component {
  constructor(props) {
    super(props);
    this.state = {value:""}
  this.handleClick = this.handleClick.bind(this);
      }
  handleClick(evt){
 const id=evt.target.id;
 const result= evt.target.value;
this.setState(prevState => ({
  value: `${prevState.value}${result}`.replace(/([\/\+-/*=])([\/\+\-\*=])/gi, '$2')
}));
if(id==="equals"){
    this.setState({value: math.eval(this.state.value)})
}
else if(id==="clear"){
this.setState({value : 0})  
 }
}
render() {
    return(
            <div id="container">
                <Display value={this.state.value} />
                <Button onClick={this.handleClick} id="zero" value={'0'} />
                <Button onClick={this.handleClick} id="one" value={'1'} />
                <Button onClick={this.handleClick} id="two" value={'2'}/>
                <Button onClick={this.handleClick} id="three" value={'3'} />
                <Button onClick={this.handleClick} id="four" value={'4'} />
                <Button onClick={this.handleClick} id="five" value={'5'} />
                <Button onClick={this.handleClick} id="six" value={'6'} />
                <Button onClick={this.handleClick} id="seven" value={'7'} />
                <Button onClick={this.handleClick} id="eight" value={'8'}  />
                <Button onClick={this.handleClick} id="nine" value={'9'} />
                <Button onClick={this.handleClick} id="decimal" value={'.'} />
                <Button onClick={this.handleClick} id="equals" value={'='} />
                <Button onClick={this.handleClick} id="clear" value={'clear'}  />
                <Button onClick={this.handleClick} id="add" value={'+'} />
                <Button onClick={this.handleClick} id="subtract" value={'-'} />
                <Button onClick={this.handleClick} id="multiply" value={'*'} />
                <Button onClick={this.handleClick} id="divide" value={'/'} />
            </div>
)
}
 
    