Reputation: 540
I have string text as
17-2018-04-04 17:31:00,289 20055001 [email protected]
How can i extract number 20055001
.
I am using this \s\d+(?=\s++)
, but i am getting space between number.
Upvotes: 0
Views: 53
Reputation: 21995
In the same way you used a positive-lookahead for the spaces after the number, you should use a positive-lookbehind for the spaces before
(?<=\s)\d+(?=\s++)
Upvotes: 2