How to remove strings from file

Discussion in 'Rebol' started by MaxV, Jan 26, 2011.

  1. MaxV

    MaxV Member

    Hello rebels,
    I need to remove all strings type from a file, example:

    Code:
    a: 2
    b: "Hello"
    c: {long long text}
    d: func [] []
    
    it should became:

    Code:
    a: 2
    b: 
    c: 
    d: func [] []
    
    I tried parse, but " char is really difficult to parse...
  2. Graham

    Graham Developer Staff Member

    If these are all legal Rebol values, then you can just load the file and remove by datatype.
  3. MaxV

    MaxV Member

    What should I use? Remove, remove-each or parse?
  4. MaxV

    MaxV Member

    Ok, I understood:
    Code:
    a: load {a: 2
    b: "Hello"
    c: {long long text}
    d: func [] []}
    foreach item a [ print type? item]
    ==
    set-word
    integer
    set-word
    string
    set-word
    string
    set-word
    word
    block
    block
    
    Thank you very much!

Share This Page