1 ! Copyright (C) 2007 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: kernel math math.parser arrays tools.test peg peg.search ;
8 "abc 123 def 456" 'integer' search
11 { V{ 123 "hello" 456 } } [
12 "one 123 \"hello\" two 456" 'integer' 'string' 2array choice search
15 { "abc 246 def 912" } [
16 "abc 123 def 456" 'integer' [ 2 * number>string ] action replace