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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -