DuanJinHui Posted July 6, 2015 Posted July 6, 2015 Hi friend How get numbers from string? eg:Agl-7.s0@2e:3?(#)8_5F result:702385 and,How get letters from string? result:AGLSEF Thanks for any help! Quote
Tharwat Posted July 6, 2015 Posted July 6, 2015 This is to parse numbers only . (vl-list->string (vl-remove-if-not '(lambda (i) (< 47 i 58)) (vl-string->list "Agl-7.s0@2e:3?(#)8_5F") ) ) Letters only . (vl-list->string (vl-remove-if-not '(lambda (a) (or (< 96 a 123) (< 64 a 91))) (vl-string->list "Agl-7.s0@2e:3?(#)8_5F") ) ) 2 Quote
DuanJinHui Posted July 7, 2015 Author Posted July 7, 2015 This is to parse numbers only . (vl-list->string (vl-remove-if-not '(lambda (i) (< 47 i 58)) (vl-string->list "Agl-7.s0@2e:3?(#)8_5F") ) ) Letters only . (vl-list->string (vl-remove-if-not '(lambda (a) (or (< 96 a 123) (< 64 a 91))) (vl-string->list "Agl-7.s0@2e:3?(#)8_5F") ) ) Thank you very much . Tharwat Quote
Tharwat Posted July 7, 2015 Posted July 7, 2015 Thank you very much . Tharwat You are most welcome. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.