If I have a string like "something12" or "something102", how would I use a regex in javascript to return just the number parts?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
I guess you want to get number(s) from the string. In which case, you can use the following:
If you want only digits:
Now you get the digits joined