Small regex request

  • MasterZ
  • Expert
  • Expert
  • User avatar
  • Posts: 699
  • Loc: Colorado Springs

Post 3+ Months Ago

Hey guys, I hav ea quick regex question. I have a string that I need to extract the first group of numbers from, and then ignore all digits/whitespace before the numbers and everything after the first set of numbers.

Specifically what I am doing is trying to get the Process ID of a running process, so I ran "tasklist" (in windows) and dumped all of the output into an array so each line is one element of the array. Now I just need to get rid of all of the junk other than the PID.

Any ideas? I know it can easily be done with regex, but I have a hard time wrapping my mind around that system.

Thank you,

- Jon
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.