I am looking to search a file and pull out data in between two strings. I am able to this with sed ok. But I also need it to only pull that information for a specific field. Example:

```
2015-04-29T08:05:24.668345-04:00 test1 [S=4444] [SID:1630710955] HOOK_EV

---SYSLOG DATA
2015-04-29T08:05:24.668345-04:00 test1 [S=4445] [SID:1630710956]
2015-04-29T08:05:24.668345-04:00 test1 [S=4444] [SID:1630710955] HOOK_EV_OFF

```

My sed statement can pull data in between the HOOK\_EV and HOOK\_EV\_OFF strings. However I would like it to only pull data for the specific SID number. Currently it will pull all data in between the two strings but for everything. So in the example above I would like to only pull data for the SID:1630710955 in between the HOOK\_EV and HOOK\_EV\_OFF string. 

Can sed do all that?