Regex replace Harvard style bibliography references \d{4}:\s\d+ with comma -
Regex replace Harvard style bibliography references \d{4}:\s\d+ with comma -
harvard bibliography, if not utilize mendeley on time can tough.
[sihler 1999: 122; trask 2000: 164].  [benveniste 1935: 170-171, Бенвенист 1955, bomhard, kerns 1994: 56-59].    the way quote authors in phd wrong. should have had , instead of :. like
[sihler 1999, 122; trask 2000, 164].     with \d{4}:\s\d+ http://regex101.com/r/me0rt9/1 can find them, how replace , instead of : in word? thanks.
you need utilize lookahead , lookbehind or backreferences, http://www.regular-expressions.info/lookaround.html.
i this: preg_replace("~(\d{4}):(\s\d+)~", "$1,$2", $str) in php instance illustration of latter solution.
here's post talks backreferences in javascript: javascript - string regex backreferences
 regex 
 
  
Comments
Post a Comment