On 6/30/07, Raul Miller <[EMAIL PROTECTED]> wrote:
On 6/30/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
> Is there a way to write a regular expression where you specify the
> expression with "anchors" ... meaning that the expression applies at
> the start or end of string or start or end of line?
require'regex'
# '^hello$'rxmatches 'hello'
1
# '^hello$'rxmatches 'i said hello'
0
Thanks. scriptdoc'regex' was no help in this regard and the wiki page
- http://www.jsoftware.com/jwiki/Studio/Regular_Expressions? - did not
list ^ when discussing regexp syntax.
--
J IRC Channel irc://irc.freenode.org/jsoftware
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm