Re: [Jprogramming] Regex vs I./E. for pattern matching

2015-08-17 Thread Jon Hough
oftware.com > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] Regex vs I./E. for pattern matching > > note that there is an even faster version > > 10 timespacex '( I. ''CTAG'' E. DNA)' > 2.656e_6 6016 > 10 timespacex 

Re: [Jprogramming] Regex vs I./E. for pattern matching

2015-08-16 Thread 'Pascal Jasmin' via Programming
@:E.each) < DNA ----- Original Message - From: Jon Hough To: "programm...@jsoftware.com" Cc: Sent: Sunday, August 16, 2015 2:09 AM Subject: [Jprogramming] Regex vs I./E. for pattern matching I recently went through the regex lab, and would like to know whether it is more idiomatic for

Re: [Jprogramming] Regex vs I./E. for pattern matching

2015-08-16 Thread Henry Rich
If you something more than a simple match, say CTAG*ATTA, regex will be easier and probably faster. As I understand, regex builds a state machine for your pattern and then executes it. Do note that you can separate the building of the machine from the execution by using rxcomp: pat =. rxcom

Re: [Jprogramming] Regex vs I./E. for pattern matching

2015-08-16 Thread Raul Miller
Yes? E. is faster than rxmatches precisely because it is less powerful. And note that you could also use ;: (but the trace operation is 5x larger than you need and most people don't like making state machines). -- Raul On Sun, Aug 16, 2015 at 2:09 AM, Jon Hough wrote: > I recently went throu

Re: [Jprogramming] Regex vs I./E. for pattern matching

2015-08-16 Thread Linda Alvord
to:programming-boun...@forums.jsoftware.com] On Behalf Of Jon Hough Sent: Sunday, August 16, 2015 2:10 AM To: programm...@jsoftware.com Subject: [Jprogramming] Regex vs I./E. for pattern matching I recently went through the regex lab, and would like to know whether it is more idiomatic for J users

[Jprogramming] Regex vs I./E. for pattern matching

2015-08-15 Thread Jon Hough
I recently went through the regex lab, and would like to know whether it is more idiomatic for J users to use regex when matching simple patterns in a string, or to use E. and similar verbs? For example. If I have an (imaginary) DNA sequence string: DNA=: 'CGATTGACTAGTCGATTGCTGATGCTCTAGTCGTGATGC