12 Feb
2012
12 Feb
'12
23:39
On 02/13/2012 12:05 AM, lynn wrote:
I'm regex'd out of it at the moment. Given a string like this:
lynn:*:3000002some other stuff100hellolynn:
Is there a way to get the 3000002 into a variable v1 and the 100 into a variable v2? bash? Any recommended starting point? Thanks, L x
Thinking out loud: v1="lynn:*:3000002some other stuff100hellolynn:";echo "${v1//[!0-9]}" gives: 3000002100 But I may have: lynn2:*:3000002some other stuff100hellolynn: which gives: 23000002100 How to select only the 3000002 Thanks -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org