PageRenderTime 723ms queryFilters 0ms Sphinxql 144ms GetByIds 413ms meta 0ms repositoryFilters 10ms languageFilters 1ms sourceFilters 39ms

108,898 results for 'gsub' (723 ms)

Source

Language

Repository

rubypants.rb https://bitbucket.org/icocoa/octopress.git | Ruby | 489 lines
354  def educate_dashes_oldschool(str)
355    str.gsub(/---/, '—').gsub(/--/, '–')
356  end
368  def educate_dashes_inverted(str)
369    str.gsub(/---/, '–').gsub(/--/, '—')
370  end
376  def educate_ellipses(str)
377    str.gsub('...', '…').gsub('. . .', '…')
378  end
383  def educate_backticks(str)
384    str.gsub("``", '“').gsub("''", '”')
385  end
390  def educate_single_backticks(str)
391    str.gsub("`", '‘').gsub("'", '’')
392  end
redcloth3.rb https://bitbucket.org/eimajenthat/redmine.git | Ruby | 1,208 lines
310
311        text.gsub!( /<\/?notextile>/, '' )
312        text.gsub!( /x%x%/, '&#38;' )
443      if str
444        str.gsub!( '&', '&amp;' )
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
446        str.gsub!( "'", '&#039;' ) if mode == :Quotes
447        str.gsub!( '<', '&lt;')
447        str.gsub!( '<', '&lt;')
448        str.gsub!( '>', '&gt;')
449      end
456        #    next if tog and method( tog ).call
457        #    text.gsub! re, resub
458        #end
mkitalic.in https://bitbucket.org/take_cheeze/easyrpg-player.git | Autoconf | 419 lines
313/^FONT[ \t]/ {
314    tmp = gsub(/-[R|r]-/, "-I-", $2);
315    if (tmp == 0)
360	if (debug == 0) {
361	    gsub(/#/,  ".", line[y]);
362	    gsub(/,/,  ".", line[y]);
362	    gsub(/,/,  ".", line[y]);
363	    gsub(/\$/, "@", line[y]);
364	    gsub(/[.@][.@][.@][.@]/, "&_", line[y]);
364	    gsub(/[.@][.@][.@][.@]/, "&_", line[y]);
365	    gsub(/\.\.\.\._/,"0", line[y]);
366	    gsub(/\.\.\.@_/, "1", line[y]);
366	    gsub(/\.\.\.@_/, "1", line[y]);
367	    gsub(/\.\.@\._/, "2", line[y]);
368	    gsub(/\.\.@@_/,  "3", line[y]);
all.rb https://bitbucket.org/tsacha/postgresql-clustering.git | Ruby | 474 lines
320        replace = File.read(file_name)
321        replace = replace.gsub(/HOST_MASTER/, HOST_MASTER)
322        replace = replace.gsub(/PORT_PSQL_MASTER/, PORT_PSQL_MASTER)
322        replace = replace.gsub(/PORT_PSQL_MASTER/, PORT_PSQL_MASTER)
323        replace = replace.gsub(/PORT_SSH_SLAVE2/, PORT_SSH_SLAVE2)
324        replace = replace.gsub(/PORT_SSH_SLAVE/, PORT_SSH_SLAVE)
324        replace = replace.gsub(/PORT_SSH_SLAVE/, PORT_SSH_SLAVE)
325        replace = replace.gsub(/PSQL_USER/, PSQL_USER)
326        replace = replace.gsub(/HOST_SLAVE2_IP/, HOST_SLAVE2_IP)
326        replace = replace.gsub(/HOST_SLAVE2_IP/, HOST_SLAVE2_IP)
327        replace = replace.gsub(/HOST_SLAVE_IP/, HOST_SLAVE_IP)
328        replace = replace.gsub(/HOST_PGPOOL_IP/, HOST_PGPOOL_IP)
328        replace = replace.gsub(/HOST_PGPOOL_IP/, HOST_PGPOOL_IP)
329        replace = replace.gsub(/HOST_SLAVE2/, HOST_SLAVE2)
330        replace = replace.gsub(/HOST_SLAVE/, HOST_SLAVE)
redcloth3.rb https://bitbucket.org/fabian/redmineforpythonlovers | Ruby | 1,178 lines
310
311        text.gsub!( /<\/?notextile>/, '' )
312        text.gsub!( /x%x%/, '&#38;' )
439      if str
440        str.gsub!( '&', '&amp;' )
441        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
441        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
442        str.gsub!( "'", '&#039;' ) if mode == :Quotes
443        str.gsub!( '<', '&lt;')
443        str.gsub!( '<', '&lt;')
444        str.gsub!( '>', '&gt;')
445      end
452        #    next if tog and method( tog ).call
453        #    text.gsub! re, resub
454        #end
redcloth3.rb https://bitbucket.org/jasonnoble2/redmine3 | Ruby | 1,209 lines
310
311        text.gsub!( /<\/?notextile>/, '' )
312        text.gsub!( /x%x%/, '&#38;' )
443      if str
444        str.gsub!( '&', '&amp;' )
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
446        str.gsub!( "'", '&#039;' ) if mode == :Quotes
447        str.gsub!( '<', '&lt;')
447        str.gsub!( '<', '&lt;')
448        str.gsub!( '>', '&gt;')
449      end
456        #    next if tog and method( tog ).call
457        #    text.gsub! re, resub
458        #end
pm.lua https://bitbucket.org/xixs/jill | Lua | 274 lines
8function f1(s, p)
9  p = string.gsub(p, "%%([0-9])", function (s) return "%" .. (s+1) end)
10  p = string.gsub(p, "^(^?)", "%1()", 1)
10  p = string.gsub(p, "^(^?)", "%1()", 1)
11  p = string.gsub(p, "($?)$", "()%1", 1)
12  local t = {string.match(s, p)}
91  local res = {s=''}
92  string.gsub(abc, p, function (c) res.s = res.s .. c end)
93  return res.s
119
120assert(string.gsub('ülo ülo', 'ü', 'x') == 'xlo xlo')
121assert(string.gsub('alo úlo  ', ' +$', '') == 'alo úlo')  -- trim
155
156x = string.gsub("$x=string.gsub('alo', '.', string.upper)$ assim vai para $return x$",
157         "$([^$]*)%$", dostring)
redcloth3.rb https://bitbucket.org/learno/redmine | Ruby | 1,209 lines
310
311        text.gsub!( /<\/?notextile>/, '' )
312        text.gsub!( /x%x%/, '&#38;' )
443      if str
444        str.gsub!( '&', '&amp;' )
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
446        str.gsub!( "'", '&#039;' ) if mode == :Quotes
447        str.gsub!( '<', '&lt;')
447        str.gsub!( '<', '&lt;')
448        str.gsub!( '>', '&gt;')
449      end
456        #    next if tog and method( tog ).call
457        #    text.gsub! re, resub
458        #end
redcloth3.rb https://bitbucket.org/marutosi/redmine-bb-1.3-stable-with-bundler | Ruby | 1,209 lines
310
311        text.gsub!( /<\/?notextile>/, '' )
312        text.gsub!( /x%x%/, '&#38;' )
443      if str
444        str.gsub!( '&', '&amp;' )
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
446        str.gsub!( "'", '&#039;' ) if mode == :Quotes
447        str.gsub!( '<', '&lt;')
447        str.gsub!( '<', '&lt;')
448        str.gsub!( '>', '&gt;')
449      end
456        #    next if tog and method( tog ).call
457        #    text.gsub! re, resub
458        #end
ftxgsub.c https://bitbucket.org/davaeron/uplink | C | 4,308 lines
207  {
208    TTO_GSUBHeader*  gsub = (TTO_GSUBHeader*)ext;
209
3931  EXPORT_FUNC
3932  TT_Error  TT_GSUB_Query_Languages( TTO_GSUBHeader*  gsub,
3933                                     TT_UShort        script_index,
4186  EXPORT_FUNC
4187  TT_Error  TT_GSUB_Clear_Features( TTO_GSUBHeader*  gsub )
4188  {
4206  EXPORT_FUNC
4207  TT_Error  TT_GSUB_Register_Alternate_Function( TTO_GSUBHeader*  gsub,
4208                                                 TTO_AltFunction  alt,
4221  EXPORT_FUNC
4222  TT_Error  TT_GSUB_Apply_String( TTO_GSUBHeader*   gsub,
4223                                  TTO_GSUB_String*  in,
apirefx.txt https://bitbucket.org/davaeron/uplink | Unknown | 865 lines
379
380    TT_GSUB_Select_Feature( TTO_GSUBHeader*  gsub,
381                            TT_ULong         feature_tag,
395
396    TT_GSUB_Query_Scripts( TTO_GSUBHeader*  gsub,
397                           TT_ULong**       script_tag_list )
404
405    TT_GSUB_Query_Languages( TTO_GSUBHeader*  gsub,
406                             TT_UShort        script_index,
415
416    TT_GSUB_Query_Features( TTO_GSUBHeader*  gsub,
417                            TT_UShort        script_index,
454
455    TT_GSUB_Clear_Features( TTO_GSUBHeader*  gsub )
456
old-bluecloth.rb https://bitbucket.org/ged/bluecloth | Ruby | 1,223 lines
200		# spaces, and a couple of guaranteed newlines at the end
201		text = self.gsub( /\r\n?/, "\n" ).detab
202		text += "\n\n"
207			text.gsub!( "<", "&lt;" )
208			text.gsub!( ">", "&gt;" )
209			@log.debug "Filtered HTML: %p" % text
212		# Simplify blank lines
213		text.gsub!( /^ +$/, '' )
214		@log.debug "Tabs -> spaces/blank lines stripped: %p" % text
252		newstr = self.split( /\n/ ).collect {|line|
253			line.gsub( /(.*?)\t/ ) do
254				$1 + ' ' * (tabwidth - $1.length % tabwidth)
672				gsub( /^/, indent ).
673				gsub( PreChunk ) {|m| m.gsub(/^#{indent}/o, '') }
674			@log.debug "Blockquoted chunk is: %p" % quoted
redcloth3.rb https://bitbucket.org/marutosi/redmine-gh-new-trunk-hg-git | Ruby | 1,209 lines
310
311        text.gsub!( /<\/?notextile>/, '' )
312        text.gsub!( /x%x%/, '&#38;' )
443      if str
444        str.gsub!( '&', '&amp;' )
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
445        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
446        str.gsub!( "'", '&#039;' ) if mode == :Quotes
447        str.gsub!( '<', '&lt;')
447        str.gsub!( '<', '&lt;')
448        str.gsub!( '>', '&gt;')
449      end
456        #    next if tog and method( tog ).call
457        #    text.gsub! re, resub
458        #end
bluecloth.rb https://github.com/taansen/alonetone.git | Ruby | 1,144 lines
173		# spaces, and a couple of guaranteed newlines at the end
174		text = self.gsub( /\r\n?/, "\n" ).detab
175		text += "\n\n"
180			text.gsub!( "<", "&lt;" )
181			text.gsub!( ">", "&gt;" )
182			@log.debug "Filtered HTML: %p" % text
185		# Simplify blank lines
186		text.gsub!( /^ +$/, '' )
187		@log.debug "Tabs -> spaces/blank lines stripped: %p" % text
225		newstr = self.split( /\n/ ).collect {|line|
226			line.gsub( /(.*?)\t/ ) do
227				$1 + ' ' * (tabwidth - $1.length % tabwidth)
594				gsub( /^/, indent ).
595				gsub( PreChunk ) {|m| m.gsub(/^#{indent}/o, '') }
596			@log.debug "Blockquoted chunk is: %p" % quoted
redcloth.rb https://github.com/dramatis/dramatis-redmine.git | Ruby | 1,140 lines
308
309        text.gsub!( /<\/?notextile>/, '' )
310        text.gsub!( /x%x%/, '&#38;' )
436    def htmlesc( str, mode )
437        str.gsub!( '&', '&amp;' )
438        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
438        str.gsub!( '"', '&quot;' ) if mode != :NoQuotes
439        str.gsub!( "'", '&#039;' ) if mode == :Quotes
440        str.gsub!( '<', '&lt;')
440        str.gsub!( '<', '&lt;')
441        str.gsub!( '>', '&gt;')
442    end
447            next if tog and method( tog ).call
448            text.gsub! re, resub
449        end
bluecloth.rb https://github.com/tapajos/podcast.git | Ruby | 1,144 lines
173		# spaces, and a couple of guaranteed newlines at the end
174		text = self.gsub( /\r\n?/, "\n" ).detab
175		text += "\n\n"
180			text.gsub!( "<", "&lt;" )
181			text.gsub!( ">", "&gt;" )
182			@log.debug "Filtered HTML: %p" % text
185		# Simplify blank lines
186		text.gsub!( /^ +$/, '' )
187		@log.debug "Tabs -> spaces/blank lines stripped: %p" % text
225		newstr = self.split( /\n/ ).collect {|line|
226			line.gsub( /(.*?)\t/ ) do
227				$1 + ' ' * (tabwidth - $1.length % tabwidth)
594				gsub( /^/, indent ).
595				gsub( PreChunk ) {|m| m.gsub(/^#{indent}/o, '') }
596			@log.debug "Blockquoted chunk is: %p" % quoted
bluecloth https://github.com/tapajos/podcast.git | Ruby | 1,227 lines
186		# spaces, and a couple of guaranteed newlines at the end
187		text = self.gsub( /\r\n?/, "\n" ).detab
188		text += "\n\n"
193			text.gsub!( "<", "&lt;" )
194			text.gsub!( ">", "&gt;" )
195			@log.debug "Filtered HTML: %p" % text
198		# Simplify blank lines
199		text.gsub!( /^ +$/, '' )
200		@log.debug "Tabs -> spaces/blank lines stripped: %p" % text
238		newstr = self.split( /\n/ ).collect {|line|
239			line.gsub( /(.*?)\t/ ) do
240				$1 + ' ' * (tabwidth - $1.length % tabwidth)
607				gsub( /^/, indent ).
608				gsub( PreChunk ) {|m| m.gsub(/^#{indent}/o, '') }
609			@log.debug "Blockquoted chunk is: %p" % quoted
bluecloth.rb https://github.com/dharmon/insoshi.git | Ruby | 1,144 lines
173		# spaces, and a couple of guaranteed newlines at the end
174		text = self.gsub( /\r\n?/, "\n" ).detab
175		text += "\n\n"
180			text.gsub!( "<", "&lt;" )
181			text.gsub!( ">", "&gt;" )
182			@log.debug "Filtered HTML: %p" % text
185		# Simplify blank lines
186		text.gsub!( /^ +$/, '' )
187		@log.debug "Tabs -> spaces/blank lines stripped: %p" % text
225		newstr = self.split( /\n/ ).collect {|line|
226			line.gsub( /(.*?)\t/ ) do
227				$1 + ' ' * (tabwidth - $1.length % tabwidth)
594				gsub( /^/, indent ).
595				gsub( PreChunk ) {|m| m.gsub(/^#{indent}/o, '') }
596			@log.debug "Blockquoted chunk is: %p" % quoted
bluecloth https://github.com/viniciusteles/selenium_poetry.git | Ruby | 1,227 lines
186		# spaces, and a couple of guaranteed newlines at the end
187		text = self.gsub( /\r\n?/, "\n" ).detab
188		text += "\n\n"
193			text.gsub!( "<", "&lt;" )
194			text.gsub!( ">", "&gt;" )
195			@log.debug "Filtered HTML: %p" % text
198		# Simplify blank lines
199		text.gsub!( /^ +$/, '' )
200		@log.debug "Tabs -> spaces/blank lines stripped: %p" % text
238		newstr = self.split( /\n/ ).collect {|line|
239			line.gsub( /(.*?)\t/ ) do
240				$1 + ' ' * (tabwidth - $1.length % tabwidth)
607				gsub( /^/, indent ).
608				gsub( PreChunk ) {|m| m.gsub(/^#{indent}/o, '') }
609			@log.debug "Blockquoted chunk is: %p" % quoted
ruby_pants.rb https://github.com/isaac/mephisto.git | Ruby | 490 lines
355  def educate_dashes_oldschool(str)
356    str.gsub(/---/, '&#8212;').gsub(/--/, '&#8211;')
357  end
369  def educate_dashes_inverted(str)
370    str.gsub(/---/, '&#8211;').gsub(/--/, '&#8212;')
371  end
377  def educate_ellipses(str)
378    str.gsub('...', '&#8230;').gsub('. . .', '&#8230;')
379  end
384  def educate_backticks(str)
385    str.gsub("``", '&#8220;').gsub("''", '&#8221;')
386  end
391  def educate_single_backticks(str)
392    str.gsub("`", '&#8216;').gsub("'", '&#8217;')
393  end
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21