usage of Regexp::EXTENDED

  • Thread starter Simon Strandgaard
  • Start date
N

nobu.nokada

Hi,

At Wed, 8 Oct 2003 20:48:17 +0900,
Simon said:
I tried
assert_match(/bc/x, "ab cd")
But it fails...

/bc/x has no spaces.
ProgrammingRuby says:
EXTENDED Ignore spaces and newlines in regexp.

But not ignore spaces and newlines in the target string.
 
S

Simon Strandgaard

Try: assert_match(/b c/x, "abcd")

that works.. but

assert_match(/b \nc/x, "abcd")

fails ?

programming-ruby says that newlines will be ignored?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,137
Messages
2,570,795
Members
47,342
Latest member
eixataze

Latest Threads

Top