insertU2B
import re
from reSource0 import mainConversion
 
class insertU2B(mainConversion):
    '''
    this function link to outside image
    http://www.youtube.com/watch?v=mqsrPNXEGdc
    after v= "here"
    input : [youtube LoQnGYnTOvU]
    output : <iframe width="425" height="349" src="http://www.youtube.com/embed/mqsrPNXEGdc" frameborder="0" allowfullscreen>
    '''
    def __init__(self):
        self.expand = r'\g<start><iframe width="425" height="349" src="http://www.youtube.com/embed/\g<u2bCode>" frameborder="0" allowfullscreen></iframe>\g<end>'
        self.pattren = r'(?P<start>.*?)(?:(\[)youtube[\s]+)(?P<u2bCode>.*)(?:[\s]*(\]))(?P<end>.*)'