Search Field For Specific Text & Select Characters After Said Text Follow
I'm a noob to BarTender VB Scripting and would like to know how I would go about setting up a script to search through the text of a field and select a specific combination of letters plus "x" nubmer of characters after that text.
eg. of text I might encounter: 'The samples were placed in container DNA 128:E08 for processing post assay setup...' What I'm interested in pulling from this text is purely "DNA 128:E08".
I initially created an action under "Search and Replace: " in the Transforms field of the Text Properties using Search and Delete Everything Before (search criteria is "DNA") which gives me what I want but also all text following the 11 characters I desire. I then tried combining a limitation of 11 characters under "Number of Characters:" transformation but that still recognized the data being deleted by the Search and Delete Everything Before criteria, thus nothing appears in my field.
I figured I could use VB Script to find text DNA and then only take the number of characters post that search criteria I desire, but I'm having a little trouble understanding the syntax.
Any help would be greatly appreciated.
Please sign in to leave a comment.