R
Rove Monteux
Hi,
Quite new to regex myself, Im trying to match a chunk of the text with
the following,
chunk = content.scan(/<!--Start Main Content Table -->(.*)<!--fr: End
Main Content Table -->/m)
That works alright, and its contents returned to the chunk string. Now
Im trying to do that way,
$start = "<!--Start Main Content Table -->"
$end = "<!--fr: End Main Content Table -->"
chunk = content.scan(/$start(.*)$end/m)
Obviously that doesnt works, suppose because of $ being a special
variable ? So my question is how to do pattern matching using variables
like that ?
Thanks !
Rove
Quite new to regex myself, Im trying to match a chunk of the text with
the following,
chunk = content.scan(/<!--Start Main Content Table -->(.*)<!--fr: End
Main Content Table -->/m)
That works alright, and its contents returned to the chunk string. Now
Im trying to do that way,
$start = "<!--Start Main Content Table -->"
$end = "<!--fr: End Main Content Table -->"
chunk = content.scan(/$start(.*)$end/m)
Obviously that doesnt works, suppose because of $ being a special
variable ? So my question is how to do pattern matching using variables
like that ?
Thanks !
Rove