RE: parse x.500 DN and change order displayed
- From: t.baetzler@xxxxxxxxxx (T Baetzler)
- Date: Mon, 31 Mar 2008 14:25:11 +0200
Peter Scott <Peter@xxxxxxxx> wrote:
On Sun, 30 Mar 2008 20:36:58 -0700, SecureIT wrote:
I am trying to change this
"cn=Bob Smith+serialNumber=CR013120080827,o=ICM,c=US"
to this:
"serialNumber=CR013120080827+cn=Bob Smith,o=ICM,c=US"
s/^(cn=.*?)+(.*?),/$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
.
- Follow-Ups:
- RE: parse x.500 DN and change order displayed
- From: peter
- RE: parse x.500 DN and change order displayed
- Prev by Date: Re: parse x.500 DN and change order displayed
- Next by Date: RE: parse x.500 DN and change order displayed
- Previous by thread: Re: parse x.500 DN and change order displayed
- Next by thread: RE: parse x.500 DN and change order displayed
- Index(es):