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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -