Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
returning text between two markers without markers included
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Xavier Noria, post: 4599690"] Those are two regexp modifiers stacked together: * With /m the dot matches newlines. I couldn't assume the text to extract doesn't contain newlines so I added it just in case. * With /x literal whitespace in the regexp are ignored. Since the regexp uses so many backslashes that gives some air for readability. As for the other mail String#match returns a MatchData object. Those objects support indexing by [], and the first capture is at index 1. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
returning text between two markers without markers included
Top