Peter Scott <Peter@[EMAIL PROTECTED]
> wrote:
> On Sun, 30 Mar 2008 20:36:58 -0700, SecureIT wrote:
> > I am trying to change this
> >=20
> > "cn=3DBob Smith+serialNumber=3DCR013120080827,o=3DICM,c=3DUS"
> >=20
> > to this:
> >=20
> > "serialNumber=3DCR013120080827+cn=3DBob Smith,o=3DICM,c=3DUS"
=20
> s/^(cn=3D.*?)+(.*?),/$2+$1,/;
Close, but no cigar ;-)
+ is a quantifier meaning 1 or more matches of the
preceeding expression, so you'll end up with all of
the string up to , in $1 and nothing in $2.
You'll have to escape it to match a literal '+'.
I would also drop the ^ since it is unclear if the
data is indeed without leading whitespace and/or
quotes.
HTH,
Thomas


|