数字だけ取り出す
この記事のポイント
- EXTRACTを選ぶ
- \d+を入れる
- コピーする
正規表現式の作成 では、文字の中から数字だけを取り出せます。
手順
- EXTRACTを選ぶ
- \d+を入れる
- コピーする
見つからないと#N/Aになるので、IFERRORで包んだ式も出ます。
正規表現の式を作るを使う(無料)
あわせて使えるツール
- 正規表現テスター:正規表現を試し、一致と置換を確かめます。
- SUBSTITUTE・REPLACEの式を作る:文字を置き換える式を作ります。
- SPLITの式を作る:文字を分ける式を作ります。
同じツールの、ほかの解説
Extracting Numbers
Key points
- Choose EXTRACT
- Enter \d+
- Copy it
In Regular Expression Builder you can pull only the digits out of text.
Steps
- Choose EXTRACT
- Enter \d+
- Copy it
A not-found result gives #N/A, so a version wrapped in IFERROR is built too.
Use "Build a Regular Expression Formula" (free)
Tools that go well with this
- Regex Tester: Test regular expressions with matches and replacements.
- Build a SUBSTITUTE Formula: Build text replacement formulas.
- Build a SPLIT Formula: Build text splitting formulas.