<p>I need a javascript regex pattern to match a person's height to check if the input is valid. Here are some sample input:</p>

<p>5' 9"</p>

<p>6'</p>

<p>5'8"</p>

<p>Any ideas?</p>

Something like:
```
```
\d'(?:\s*\d+'')?
```
```
The second part refers to optional part of the heigth.
Remove the + if you want only one digit.
```
```
\b\d'(?:\s*\d+'')?\b
```
```
can also be used to detect that pattern within a text (avoid detecting 1234'45 as an heigth for... a person?!)
You can test that regexp
here for javascript
.