lib/rmega/nodes/factory.rb in rmega-0.2.0 vs lib/rmega/nodes/factory.rb in rmega-0.2.1
- old
+ new
@@ -14,12 +14,12 @@
module Rmega
module Nodes
module Factory
extend self
- URL_REGEXP = /mega\..+\/\#([A-Z0-9\_\-\!\=]+)/i
+ URL_REGEXP = /(http.:\/\/[w\.]*mega\.[a-z\.]+\/\#[A-Z0-9\_\-\!\=]+)/i
- FOLDER_URL_REGEXP = /mega\..+\/\#\F([A-Z0-9\_\-\!\=]+)/i
+ FOLDER_URL_REGEXP = /\#\F/
def url?(string)
string.to_s =~ URL_REGEXP
end