I am working on XML that contains lists of regular expressions that will be used as capture groups. Why this is so is a long story, not something that I can change.
I just came across a situation where I want to write a name that spans two lines, i.e. Bob\nJones . Is there a way to capture this whole name into one capture group without using any other capture groups in Perl using regex? Basically, I want for $1 = "Bob Jones" , replacing \n space.
I think this is not possible, and the correct way would be to use group capturing for the first and last name (which I cannot do in my case), but I decided that I would ask anyway before I give it up. Any ideas?
source share