Friday, June 8, 2012
Visual Studio RegEx Helpers for VB.NET to C#
Desire: QueryString("whatever") to QueryString["whatever"]
Find: QueryString\("{[^"]+}"\)
Replace: QueryString["\1"]
Desire: userData(0) to userData[0]
Find: userData\({(.#)}\)
Replace: userData[\1]
Desire: Session(whatever) to Session[whatever]
Find: Session\({(.#)}\)
Replace: Session[\1]
Desire: Cache(whatever) to Cache[whatever]
Find: Cache\({(.#)}\)
Replace: Cache[\1]
Desire: rowsXX(i).Item("Whatever") to rowsXX[i]["Whatever"]
Find: rows{.}\({(.#)}\).Item\({(.#)}\)
Replace: rows\1[\2][\3]
Desire: .Tables(0) to .Tables[0]
Find: \.Tables\({(.#)}\)
Replace: .Tables[\1]
Desire: .Split("a") to .Split('a')
Find: \.Split\("{[^"]+}"\)
Replace: .Split('\1')
Desire: dtrXX("Whatever") to dtrXX["Whatever"]
Find: dtr{..}\({(.#)}\)
Replace: dtr\1[\2]
Subscribe to:
Posts (Atom)