[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] Non-english outlook block quote regexp



Ico Doornekamp, 2011-01-26 15:12:
> Any opinions on matching the exact number of hashes, two uppercase words
> and again the exact number of hashes, something like:
> 
>   ^-----\s*([A-Z][a-z]+\s*){2}----+$
> 
> Would that be safe to do ?

Prolly safe, but it misses german Outlook quote

  "-------- Original-Nachricht --------"

and yes, it has different amount of dashes :-O Also it misses finnish
quote (for two obvious reason).

  "-----Alkuperäinen viesti-----"

Would ^-----+\s*\S+[ -]\S+\s*-----+$ do the trick and not give false
positives?

ps.  I have occasionaly thought of configurable quote etc. regexen.
Would anybody else use such a feature?  Or should we go all the way to
state-transition-hook for state machine parsing message body?  :)

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk