T
tuyet.ctn
Hi,
How do I extract CYZ-EdEi8QBzG2f3m7prHw99 from the sessionId text
below. The reg expression I have is partially working. It returns CYZ
but I want the whole string CYZ-EdEi8QBzG2f3m7prHw99
Your help is appreciated. I've used RegEx coach tool but didn't come
up with a good expression. Thanks.
irb(main):100:0> puts sessionId
<FRAMESET border=0 frameSpacing=0 rows=0,* frameBorder=0><FRAME
border=0 name=re
lay marginWidth=0 marginHeight=0 src="/include/blank.html"
frameBorder="" noResi
ze scrolling=no><FRAME border=0 name=main marginWidth=0 marginHeight=0
src="/ara
neae/Analysis/home?common.sessionId=CYZ-EdEi8QBzG2f3m7prHw99"
frameBorder=0 scro
lling=no></FRAMESET>
=> nil
irb(main):101:0> sessionId2 = sessionId[/sessionId=\w+/]
=> "sessionId=CYZ"
How do I extract CYZ-EdEi8QBzG2f3m7prHw99 from the sessionId text
below. The reg expression I have is partially working. It returns CYZ
but I want the whole string CYZ-EdEi8QBzG2f3m7prHw99
Your help is appreciated. I've used RegEx coach tool but didn't come
up with a good expression. Thanks.
irb(main):100:0> puts sessionId
<FRAMESET border=0 frameSpacing=0 rows=0,* frameBorder=0><FRAME
border=0 name=re
lay marginWidth=0 marginHeight=0 src="/include/blank.html"
frameBorder="" noResi
ze scrolling=no><FRAME border=0 name=main marginWidth=0 marginHeight=0
src="/ara
neae/Analysis/home?common.sessionId=CYZ-EdEi8QBzG2f3m7prHw99"
frameBorder=0 scro
lling=no></FRAMESET>
=> nil
irb(main):101:0> sessionId2 = sessionId[/sessionId=\w+/]
=> "sessionId=CYZ"