• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • 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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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