Tag: regex

  • Regex For Block With Start And End Over Multiple Lines

    I was reformatting some html code for a table with many rows and columns and in cell tables which had HTML comments that I wanted to remove. There were over a hundred comments in between the cells spanning multiple lines with tabs and spaces at the beginning and end of the comments and a manual…

  • URL Regex (Regular Expression)

    I have been researching and fine tuning a regular expression to find http, https and ftp addresses within the body of text so that they can be shortened and automatically linked in PHP code. This is my latest regex which seems to work OK: ((http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9:\-\._\?\,\’/\\\+&%\$#\=~])*[^\.\,\)\(\s])  Appreciation: RegexBuddy : Software for creating, testing and using regular expressions. EditPad…

>