Thanks for tipping me to (?  .  That will make things easier.
And since I was just looking for a way to match across
newlines, my pattern can be

'(?is)<html>.*</html>'

Henry Rich 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bron
> Sent: Tuesday, December 26, 2006 11:31 AM
> To: [email protected]
> Subject: Re: [Jprogramming] Regex crashes in J6.01c
> 
> > stringhashtml =: ...
> 
> You might try this definition instead:
> 
>          stringhashtml =: (rxcomp '(?i)<html>[^\0]*</html>')
>                              &(0&<:@:((<0 0)&{)@rxmatch)
> 
> Examples:
> 
>          stringhashtml 'no html'
>       0
>          stringhashtml '<html>yes html</html>'
>       1
>          stringhashtml '<HTML>caps html</HTML>'
>       1
>          stringhashtml '<HtMl>mixed case html</hTmL>'
>       1
>          stringhashtml '<html>',({.a.),'uh oh, a null</html>'
>       0
>          stringhashtml '<html>unclosed html'
>       0
> 
> I hope this one doesn't crash on you.  Good luck.
> 
> -Dan
> 
> ----------------------------------------------------------------------
> 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