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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -