Wednesday, November 01, 2006

HOWTO regexp Visual Studios and automating code/sql/data creation

This is my little documentation area of regexps that I create when I need to convert one for of text to another. Being in Windows, I've taken to simply using the Visual Studios regexp Find and Replace.

My plan is to update this entry as do other regexps in my day to day work life.

First off feel free to check the Use: Regular Expression button in the Find and Replace Dialog



(1) IDL definition into PL/SQL
To replace:
LINEITEMFLAG_****** = 1, //bit 1
with
insert into lineitem_flags values ('1', 'LINEITEMFLAG_****** Description', 'LINEITEMFLAG_******');

regexp search for: {LINEITEMFLAG_[A-Z,_]*}:b*=:b*{.*},.*$
regexp replace with: insert into lineitem_flags values ('\2', '\1 Description', '\1');

1 comment:

Teagan W said...

Heello mate nice blog