Perl regex: indent/add words after matching keyword in a string? -


I am indenting text using a regex before and after a word in a string?

I have the following string

  This is some keyboard fill text   

and I want to convert it to:

  This is something & lt; * & Gt; KEYWORD & lt; * & Gt; Full text    

A literal interpretation will be:

  S / (KEYWORD) / & lt; * & Gt; $ 1 & lt; * & Gt; / G    

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -