perl - Can a single regex capture group capture a phrase without some of its middle characters? -


i'm working on xml lists regexs used capture groups. why it's done way long story , not can change.

i've come upon situation want capture name spans 2 lines, i.e. bob\njones. there way me capture whole name 1 capture group without using other capture groups in perl using regex? basically, want $1 = "bob jones", replacing \n space.

i'm thinking isn't feasible , right way use capture group first , last name (which can't in case), figured i'd ask anyway, before give on it. ideas?

no.


Comments