Match text between asterisks

/ Published in: Regular Expression
Save to your folder(s)

Matches text between each pair of asterisks (see URL above for demo)


Make text between asterisks bold, like in Textile (in Ruby):

`test.gsub(/(\*)+([^.*?$]+)+(\*)/, '<strong>\\2</strong>')`

Copy this code and paste it in your HTML
  1. (\*)+([^.*?$]+)+(\*)


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.