Image

Imagesoltice wrote in Imagephp

pattern challange

I assumed that that what I was thinking this had to be done with some text processing and not a simple pattern replace, but I'm curious if there is actually a way that I haven't considered.

I would like a (perl) regex to encircle a phrase with an HTML text format tag. Here's how I would like it to work:

  • *a bunch of words* = a bunch of words
  • _a bushel of words_ = a bushel of words
  • /a flock of words/ = a flock of words
Alternitively, *a*bunch*of*words* can be used, but this is rather annoying to type in and I would like to avoid it if possible.

Thanx!