I am having different outputs on regex matching 1) when using Rubular and 2) other when using rails console or irb environment.
1) Rubular
/\w+/ on test string "---\n- nicidnut\n" matches " n nicidnut n"
(I have shown only matched part and put spaces for unmatched string characters)
2) irb
(/\w+/).match("---\n- nicidnut\n") produces "nicidnut".
I can't understand why there is two different outputs and what am I missing?