Regular Expressions

Aus C3D2
Wechseln zu: Navigation, Suche

Speicherfresser

irb(main):001:0> ''.scan(/(((.*)+)*)+/)
(irb):1:in `scan': failed to allocate memory (NoMemoryError)
	from (irb):1:in `irb_binding'
	from /usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
	from :0

Funktioniert in Perl nicht, in den pcre-Manpages stand was genaueres... wer findets?

/^(https?:\/\/)?[a-z0-9]+([\.\-\_=&\+\/\?]?[a-z0-9]+)+$/i
/<(?:[^">]+|"[^"]*")+>/