← 返回 meta 的题目列表Remove all non-numeric characters
类型:online_judge
meta
Given a string s containing both letters and numbers, remove all non-numeric characters and return the result.
Example
Example 1:
Input: s = 'abc123xyz456'
Output: '123456'
Example 2:
Input: s = 'a1b2c3'
Output: '123'
Constraints
The length of the string is [1, 10000].
Example
Input
abc123xyz456