Two reasons.

One is that by default regex assumes utf8 and a. is not utf8. To
disable that, you need to go:
   rxutf8 0

The other is that the regex implementation we are using assumes C
strings, which are null terminated. So you need to get rid of any
nulls if you want regex to go past them.

   'a' rxmatch ' ' 0} a.
97 1

I hope this helps,

-- 
Raul


On Tue, Dec 22, 2015 at 8:29 PM, Ryan Eckbo <ec...@cim.mcgill.ca> wrote:
> Why doesn't regex work on binary?
> e.g.
>
> load'regex'
> 'a' rxmatch a.
> _1 0
>    'a' rxmatch AlphaNum_j_
> 26 1
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to