I’m working on an XML that lists regexs that are to be used as capture groups. Why it’s done this way is a long story and not something I can change.
I’ve just come upon a situation where I want to capture a name that spans two lines, i.e. Bob\nJones. Is there any way for me to capture that whole name into one capture group without using any other capture groups in Perl using regex? Basically, what I want is for $1 = "Bob Jones", replacing the \n with a space.
I’m thinking this isn’t feasible and the right way would just be to use to capture group for the first and last name (which I can’t do in my case), but I figured I’d ask anyway, before I give up on it. Any ideas?
No.