Re: how to identify string between flower braces



Russell Trleleaven wrote:
tampabay.bucks@xxxxxxxxx wrote:

Hi

I have a string which would be something like below :

set myStr "{8} {Security Configuration} {null} {}} {{9}"

I would to retrieve what is present inside the flower braces after
Security Configuration which is "null" in this case. Can i do this with
a regular expression ?

Thanks
Arun

set result [ lindex [ string map { \{\{ \{ \}\} \} } $myStr ] 2 ]

Bad example. You should never use lindex or any other list command on strings. The above may work for the above very specific case, but it can break in so many ways for so many forms of real world data.
.



Relevant Pages

  • Re: how to identify string between flower braces
    ... I have a string which would be something like below: ... I would to retrieve what is present inside the flower braces after ... Security Configuration which is "null" in this case. ...
    (comp.lang.tcl)
  • Re: how to identify string between flower braces
    ... I have a string which would be something like below: ... I would to retrieve what is present inside the flower braces after ... Security Configuration which is "null" in this case. ...
    (comp.lang.tcl)
  • how to identify string between flower braces
    ... I have a string which would be something like below: ... I would to retrieve what is present inside the flower braces after ... Security Configuration which is "null" in this case. ...
    (comp.lang.tcl)
  • Re: how to identify string between flower braces
    ... I have a string which would be something like below: ... I would to retrieve what is present inside the flower braces after ... Security Configuration which is "null" in this case. ...
    (comp.lang.tcl)
  • Re: Getting command line of another process
    ... It seems to be very complicated code just to retrieve the command line of a process. ... static public bool RetrieveUserModeProcessString(IntPtr HandleProcess, IntPtr PageBaseAddress, UInt32 UnicodeStringOffset, out string Result) ... UInt32 UnicodeStringSize = 8; ... pStringContent = Marshal.AllocCoTaskMemStringLength); ...
    (microsoft.public.win32.programmer.kernel)