Add tags

Add tags to the following comment
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
def remove_comment(str)
  str.gsub(%r!/\*(.+?)(\*/|$)!, "")
end

remove_comment('AAA')           # => "AAA"
remove_comment('AAA/*BBB*/')    # => "AAA"
remove_comment('AAA/*BBB')      # => "AAA"
remove_comment('AAA/*BBB*/CCC') # => "AAACCC"
remove_comment('AAA/*BBB/*CCC*/DDD*/EEE') # => "AAADDD*/EEE"
remove_comment('AAA/a//*BB*B**/CCC') # => "AAA/a/CCC"

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...