Forum Discussion
The syntax of the findstr command is basically this:
findstr [data] [string] [skip] [eol]
where [data] is the data you're looking through, [string] is the string in the data you're looking for, [skip] is the number of characters you want to skip after the index of the matching string, and [eol] is a string that terminates the collection. So for example, your data looks like this:
UserID=jeff.g@company,Passworddfsdfsdfdf
So to get the value after between the @ character and the comma, your findstr would look something like this:
[findstr [TCP::payload] "@" 1 ","]
where [TCP::payload] is the data to look through, the "@" character is what you're looking for, 1 is the number of characters to skip after the index of the matching string (in this case just one character "@"), and "," is where to stop collecting. Here's another example to help set it in stone.
set data "cn=bob.smith,ou=users,dc=domain,dc=com"
set user [findstr $data "cn=" 3 ","]
The user variable now equals "bob.smith".