Medicine, Institute for Stem Cell Research, School of Biological Sciences, University of Edinburgh, SCRMMedicine, Institute for Stem Cell Research, School of Biological Sciences, University of Edinburgh, SCRMMedicine, Institute for Stem Cell Research, School of Biological Sciences,
例如,系列4,5,6,7被编写为4-7。我的目标是扩展这个字符串,使所有数字都由comas分隔(4-7应该变成4,5,6,7)。我做了什么,s="4092-4093,4095-4097,4104,4107,4111,4125-4127"如何将4-7类型的模式替换为字符串中的4,5,6,7?我在Mac OS X 10.11.3上使用Terminal 2.6.1 (361.1)