Link to home
Start Free TrialLog in
Avatar of CASorter
CASorterFlag for United States of America

asked on

visual studio 2015 environment replacing characters (regex)

i have inherited some VB.Net  code...
there are explicit line number labels in the code...

the problem is that the line they are supposed to be associated with is on the next line   ...

  so it looks like this

1350:
                      Slots = Slots +1

when it should look like this

1350:            Slots = Slots +1

so i need to find all ....: that have N spaces followed by a CRLF

and replace it with ....:
with nothing after the :

i have looked at using the regular expression stuff.. and have found some things that find blank lines.. but these lines are not blank....

edit: ----------------------------------------------------------------------------------------------------------------
----the pattern i am looking for .... i believe...   is a colon followed by a newline

i put in \n   it finds the end of every line
i put in [:]  it finds every colon
but i put in [:]\n... and it doesn't find anything


TIA
ASKER CERTIFIED SOLUTION
Avatar of CASorter
CASorter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CASorter

ASKER

[:]\s*\n does what i want and i figured it out myself
[:]   literal colon
\s*any number 0 to ... of white space
\n