Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

PS: ignore all quotes, just there to wrap up the regex, also this forum trims spaces so I've said 4 spaces instead of typing them.

 

Does VS2005's search & replace lack full RegEx support (ala .Net's)? I'm trying to safely convert the 4 space indents to tabs, and want to do this safely. Meaning I don't want to simply convert "4 spaces" to "\t" just in case some string or other (non indenting) spacing exists.

 

I tried the following RegExs and VS2005 didn't like them, what am I doing wrong?

^(    ){1,}
^(\s{4}){1,}

Anybody reading this should read those as 4 spaces, in sets of 1 or more that start at the beginning of the line. The only thing I can get to work in VS2005 is "^4 spaces". I cannot do sets or use \s, what gives?!

Edited by travisowens
Experience is something you don't get until just after the moment you needed it

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...