Hi Şemseddin, >> parse blk [some [[integer! string! (print "ok")] | skip ]] ok ok == true
but this works only as long as you use items according the Rebol syntax rules. On 19.03.2010 13:20, Şemseddin Moldibi wrote: > Hi, how do I extract just valid items or skip invalid ones using parse: > > blk: [1 "a" 2 "b"] ;there are 2 valid values > >>> parse blk [some [integer! string! (print "ok")]] >>> > ok > ok > > >>> blk: [1 "a" 1.2.3 2 "b"] ;there is an invalid item 1.2.3 >>> parse blk [some [integer! string! (print "ok")]] >>> > ok > == false > > How do I say, take the valid ones, just like in regular expressions? > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
