From: martinahansen Date: Thu, 24 Nov 2011 10:57:17 +0000 (+0000) Subject: fixed regex in backtrack.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a9202990ccaec9443cca66f74c3b62dae466b721;p=biopieces.git fixed regex in backtrack.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1683 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/backtrack.rb b/code_ruby/lib/maasha/backtrack.rb index 065f410..896fe09 100644 --- a/code_ruby/lib/maasha/backtrack.rb +++ b/code_ruby/lib/maasha/backtrack.rb @@ -35,7 +35,7 @@ class BackTrackError < StandardError; end # Algorithm based on code kindly provided by j_random_hacker @ Stackoverflow: # http://stackoverflow.com/questions/7557017/approximate-string-matching-using-backtracking/ module BackTrack - OK_PATTERN = Regexp.new('^[flsycwphqrimtnkvadegu]+$') + OK_PATTERN = Regexp.new('^[bflsycwphqrimtnkvadegu]+$') MAX_MIS = 5 # Maximum number of mismatches allowed MAX_INS = 5 # Maximum number of insertions allowed MAX_DEL = 5 # Maximum number of deletions allowed