I am having trouble with the re-seq regular expression form. I am not an expert on regex, so this is probably part of my problem. I have a k12 text file, basically it is hex broken up by '|' . I would like to grab all the hex between two hex numbers (sample text below). For example, I might want all of the text between 49|00 and a4|ff
I wrote the following regex to do this: (re-seq #"49[0-9a-f|]+|a4|ff|+" slurped) This didn't work and gave me an exception about the + sign being a dangling meta character, So, I rewrote it with the expression placed in parenthesis: (re-seq #"(18[0-9a-f|]+|b6|a5|)+" slurped) Now, this works, but is kind of funky b/c it a lot of the sequences I get are empty. It looks kind of like this (["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["49|00|47|00|2f|00|60|ff|5f|ff|41|ff| 1e|ff|78|ff|35|00|ea|ff|d2|ff|bd|ff|69|00|7e|00|8e|00|5e|00|c2|00|7d| 00|b1|ff|5f|00|be|00|20|00|c9|ff|b5|ff|86|ff|66|00|9b|00|25|00|73|ff| b0|ff|94|ff|e3|ff|8d|00|7a|00|90|ff|70|ff|8a|ff|b1|ff|51|00|a0|ff|b5| ff|91|ff|c6|ff|07|00|c9|ff|b4|ff|9e|ff|be|ff|cd|ff|a6|00|23|01|21|01| a4|00|3d|00|22|00|ab|ff|af|ff|8e|ff|43|ff|51|ff|6b|ff|b6|ff|bf|ff|a4| ff|27|00|84|00|7c|00|82|00|9f|00|5a|00|34|00|27|00|6c|00|77|00|41|00| c0|ff|c6|ff|ad|ff|bd|ff|7c|00|3a|00|90|ff|b8|ff|48|ff|99|00|69|00|48| 00|27|00|7e|ff|83|ff|ca|ff|bf|ff|d9|ff|72|ff|87|ff|c2|ff|c1|ff|b9|ff| e1|ff|94|ff|c7|ff|e4|ff|c7|00|ca|00|be|00|99|00|37|00|c7|ff|d7|ff|36| 00|43|ff|62|ff|2c|ff|73|ff|a4" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""] ["" ""]) Sample k12 hex: +---------+---------------+----------+ 01:30:28,579,598 ETHER |a5|a5|a5|a5|a5|a5|a5|a5|a5|a5|a5|a5| +---------+---------------+----------+ 01:30:28,646,595 ETHER |b0|ff|db|ff|c1|ff|f2|ff|13|00|57|00|a9|00|d3|00|f3|00|9f|00|49|00|47| 00|2f|00|60|ff|5f|ff|41|ff|1e|ff|78|ff|35|00|ea|ff|d2|ff|bd|ff|69|00| 7e|00|8e|00|5e|00|c2|00|7d|00|b1|ff|5f|00|be|00|20|00|c9|ff|b5|ff|86| ff|66|00|9b|00|25|00|73|ff|b0|ff|94|ff|e3|ff|8d|00|7a|00|90|ff|70|ff| 8a|ff|b1|ff|51|00|a0|ff|b5|ff|91|ff|c6|ff|07|00|c9|ff|b4|ff|9e|ff|be| ff|cd|ff|a6|00|23|01|21|01|a4|00|3d|00|22|00|ab|ff|af|ff|8e|ff|43|ff| 51|ff|6b|ff|b6|ff|bf|ff|a4|ff|27|00|84|00|7c|00|82|00|9f|00|5a|00|34| 00|27|00|6c|00|77|00|41|00|c0|ff|c6|ff|ad|ff|bd|ff|7c|00|3a|00|90|ff| b8|ff|48|ff|99|00|69|00|48|00|27|00|7e|ff|83|ff|ca|ff|bf|ff|d9|ff|72| ff|87|ff|c2|ff|c1|ff|b9|ff|e1|ff|94|ff|c7|ff|e4|ff|c7|00|ca|00|be|00| 99|00|37|00|c7|ff|d7|ff|36|00|43|ff|62|ff|2c|ff|73|ff|a4|ff|32| +---------+---------------+----------+ 01:30:28,669,317 ETHER |a5|a5|a5|a5|a5|a5|a5|a5|a5|a5|a5|a5| +---------+---------------+----------+ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.