• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

Reg Exp - pulling number from string and spave

Hello -

I need a regular expression that will let me pull the number 123456 from the following string, 'SO#123456 P5'. I need to make sure the space trailing after 123456 is not included with the pulled number.

Regular Expressions

Thanks.
0
DTwined
Asked:
DTwined
1 Solution
 
Patrick MatthewsCommented:
This will pull in the first set of 1 or more consecutive digits:

\d+
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now