You are viewing limited content. For full access, please sign in.

Question

Question

Token expressions for pattern matching to capture number with leading zeroes

asked on November 12, 2015

When I setup my expression to capture a number that starts with a zero as soon as I go past the 4th digit it drops the leading zero.  What do I need to put here in order to get the leading zero?  See below example:

Thanks,

Robin

0 0

Answer

SELECTED ANSWER
replied on November 12, 2015 Show version history

EDIT: your problem is the "." after the #\s*. <--that last period is accounting for the first character after the space. 

 

I was able to get it using:  # (\d+)

I used the # as an anchor, then said I am looking for at least 1 digit after.

2 0

Replies

replied on November 12, 2015

Darrell,

Thanks!!! I knew it was something simple I was doing wrong!

Appreciate it!

 

Robin

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.