re = /^#TR\|\d+[^\t]+\tIdentifier\|\d+[^\t]+\t(FC\d+)\/(\d+)/m
str = '#TR|1 Normal Identifier|2 Normal FC0018724/001
#TR|1 Normal Identifier|2 Normal FC0013224/001
#TR|1 Normal Identifier|2 Normal FC001111113/001
'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html