Sha256: 0ba15e464f2d8770359a36c2ed0804384b3c36565eb4ae07af4a7dcd77b34bdd

Contents?: true

Size: 671 Bytes

Versions: 11

Compression:

Stored size: 671 Bytes

Contents

Mode = :strict
name = "windows"

found = Dir.glob(File.join("/mnt/WinVault/Alexandrial/Technical", "**/**")).reject { |f| File.directory?(f) }.select { |v| 

  vv = File.basename(v)
  case Mode
  when :strict
    
    res1 = (/^#{name}[-,_,.,\s]/i =~ vv)
    res2 = (vv =~ /[\(,-,_,.,\s]#{name}[\),-,_,.,\s]/i)
    res3 = (vv =~ /[-,_,.,\s]#{name}\z/i)

    puts "#{vv} : #{res1} / #{res2} / #{res3}"

    (res1 or res2 or res3)

  else

    res1 = (vv =~ /[(,-,_,.,\s]#{name}[),-,_,.,\s]/i)
    res2 = (vv =~ /[(,-,_,.,\s]#{name}/i)
    res3 = (vv =~ /#{name}[),-,_,.,\s]/i)

    puts "#{vv} : #{res1} / #{res2} / #{res3}"
    (res1 or res2 or res3)
  end

}

p found

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
elib_mgmt-cli-0.1.12 regex_live_text.rb
elib_mgmt-cli-0.1.9 regex_live_text.rb
elib_mgmt-cli-0.1.8 regex_live_text.rb
elib_mgmt-cli-0.1.7 regex_live_text.rb
elib_mgmt-cli-0.1.6 regex_live_text.rb
elib_mgmt-cli-0.1.5 regex_live_text.rb
elib_mgmt-cli-0.1.4 regex_live_text.rb
elib_mgmt-cli-0.1.3 regex_live_text.rb
elib_mgmt-cli-0.1.2 regex_live_text.rb
elib_mgmt-cli-0.1.1 regex_live_text.rb
elib_mgmt-cli-0.1.0 regex_live_text.rb