We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
> x = 'Spam Eggs' > reg =/(\w+)\s+Eggs/ > > x.match(reg) // Match object [ 'Spam Eggs', 'Spam', index: 0, input: 'Spam Eggs', groups: undefined ] > x.match(reg)[0] // Whole string if match 'Spam Eggs' > x.match(reg)[1] // Match value within first () 'Spam'