G
Guest
This is a bit of an abuse of this group. Just a nit, but I'm hoping someone
really good with Regular Expressions can help me out here.
I need to write a regular expression that will do the following:
Search a whole blob of text (including newlines and everything).
Find any text enclosed in brackets ([xyz]), and replace it with a string I
provide and then concatenate the text that had been enclosed in the brakets,
without the brakets.
So, for example:
Input String:
"Hi there. My name is [Alex]. My brother's name is [Billy]."
Prepend Parameter:
"Mr. "
For this example, the output would be:
"Hi there. My name is Mr. Alex. My brother's name is Mr. Billy."
I'm sure that this is very simple for people who know RegEx's. I ain't one
of those people. Anyone's help would be MOST appreciated.
Alex
really good with Regular Expressions can help me out here.
I need to write a regular expression that will do the following:
Search a whole blob of text (including newlines and everything).
Find any text enclosed in brackets ([xyz]), and replace it with a string I
provide and then concatenate the text that had been enclosed in the brakets,
without the brakets.
So, for example:
Input String:
"Hi there. My name is [Alex]. My brother's name is [Billy]."
Prepend Parameter:
"Mr. "
For this example, the output would be:
"Hi there. My name is Mr. Alex. My brother's name is Mr. Billy."
I'm sure that this is very simple for people who know RegEx's. I ain't one
of those people. Anyone's help would be MOST appreciated.
Alex