Contains(...) is a really interesting function. It seems like it might return just true or false, true if the test string is found anywhere in the source string, and false if not.
It actually returns the position (of the first occurrence) of the test string in the source, and 0 if not found. Since 0 means false and non-zero means true, Contains(...) will work just fine if you expect the true/false result.
But, as Jim's example shows, you can use the position of the first occurrence to determine if it is at the beginning. This will be more efficient than regex(...) which will spin up more machinery to do this easy test.
Contains is easier to read: your original regex test might look like this:
dt << select where( !Is Missing( Regex( dt:"Aligned_bin_on_ref(ref[+/-]strand:start-end)"n, "^Insert" ) ) );
because regex(...) returns a missing value when it fails to match.
In either case, a comment will help the next person that maintains the code, either /* ==1 to make sure it is at the start */ or /* regex returns missing if not found at the ^ start */
edit: regex(...)=="Insert" would also work, but the compare against a missing value doesn't return true or false so I avoid it.
Craige