Customer is using Visual COBOL for Visual Studio 2010 2.1 and is using the Find option to search for the string "CUST".
He has the following data items defined in his program:
01 CUST PIC X(30).
01 CUST-CONTACT PIC X(30).
01 CUST-COMPANY PIC X(30).
He is using the match whole word option and was expecting it to return only the references to CUST and not to the other data items with CUST as part of the name.
Is there a way of returning only references to the actual CUST data item?
This is a problem because the word search in Visual Studio knows nothing about COBOL identifiers and that the hyphen is treated as a word separator and not as part of the identifier for the search.
You can get the desired result by checking the Use box at the bottom of the dialog and selecting Regular Expressions and then using the search:
This says to search for all matches of CUST that do not have a hyphen following.
After you change the option to Regular Expressions an Expression Builder option appears as an arrow to the right of the search field. If you click this you will get a list of regular expression characters and you can click the option to list all characters to bring you to the Help on this subject.