Welcome To Snipplr
Everyone's Recent Regular Expression Snippets Tagged ruby
- 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
1199
posted 13 years ago by inko9nito
« Prev 1 Next »