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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -