ruby - regular expression - find - replace -
in project have sometime written
= {:key=>"value", :key2=>value2}
i need replace space between key value arrow below:
= {:key => "value", :key2 => value2}
i find [^\s-]=>[^\s-]
, don't know how replace such way should
= {:key => "value", :key2 => value2}
i found answer:
find : ([^\s-])=>([^\s-])
replace : $1 => $2
it worked me...
cheers!!! hurrrreh!!!
Comments
Post a Comment