Question: I have my table named sup\_mon:

```
m_id
1
2
3
4
5

```

lets assume that this post array has 1,2,3 values.

```
$m_id = $_POST['m_id'][$_POST['m_id']];

```

How can i select the m\_id from array post which has the value of m\_id[1],m\_id[2],m\_id[3] ?

like:

```
   m_id
    1
    2
    3

```

Answer: 
```
str = "111"
if(str =~ /^\d+$/)
    print "matched\n";
end

str = "4.3"
if(str =~ /^\d+\.\d+$/)
    print "matched\n";
end

```
Check if it is integer:

```
"3" !~ /\D/
"3g" !~ /\D/
"4.3" !~ /\D/

```

Check if it is float:

```
!!("3" =~ /\A\d+\.\d+\z/)
!!("3g" =~ /\A\d+\.\d+\z/)
!!("4.3" =~ /\A\d+\.\d+\z/)

```