For example you have an SQL query like this
create table ipn_trans( id int not null primary key auto_increment, txn_type varchar(100), charset varchar(20), custom varchar(255) )
You want to create variables for each of the field. The first think you want to do is remove anything after the variable name. Use the following regular expression to achieve in in TextMate on Lion OSX.
.+ [ there are three character here, first is space, then dot then +.] </pre Space character mean start the match with a space character anywhere in the line . mean any character + means one or more of the previous character The same should work in Visual Studio (they have regular expression too) but it is a bit buggy. For example if you use the above regex to find one element and then the other, In Textmat, after finding first match it goes to the next in the remaining available text. In visual studio clicking next take you inside the same highlighted text which has another space character.
Other regular expression patterns in TextMate$(.M)+ [the sentence must start with $ followed by any character. 2nd character must be M