Welcome To Snipplr
Everyone's Recent Regular Expression Snippets Tagged replace
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
Matches text between each pair of asterisks (see URL above for demo)
**Example:**
Make text between asterisks bold, like in Textile (in Ruby):
`test.gsub(/(\*)+([^.*?$]+)+(\*)/, '<strong>\\2</strong>')`
0
1201
posted 13 years ago by inko9nito
search for anything in-between two <TAG>'s and then replace the found string into the PHP if/else staement. $1 is wher TextMate stores the found string. (see http://screenflicker.com/mike/code/textmate-regex-replace/)
3
888
posted 13 years ago by rwczippy
« Prev 1 Next »