Constant

BlueCloth::InlineImageRegexp

Next, handle inline images: ![alt text](url "optional title") Don’t forget: encode * and _

%r{
      (                                     # Whole match = $1
              !\[ (.*?) \] # alt text = $2
        \([ ]*
              <?(\S+?)>?           # source url = $3
          [ ]*
              (?:                          # 
                (["'])             # quote char = $4
                (.*?)                      # title = $5
                \4                 # matching quote
                [ ]*
              )?                           # title is optional
        \)
      )
}xs
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.