Regular Expressions in Visual Studio's Find & Replace

  • Thread starter Thread starter JackRazz
  • Start date Start date
J

JackRazz

Could someone give me a very simple regular expression for Visual Studio's
search/replace using backreferences saving portions of the match as \1 or $1 or
whatever. I want to use something I can use in VS interactave search/replace, but
can't find the reference. Just a simple one is all I need.

Thanks - JackRazz at sbcglobal dot Net
 
US Phone Number Match

((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
* "JackRazz said:
Could someone give me a very simple regular expression for Visual Studio's
search/replace using backreferences saving portions of the match as \1 or $1 or
whatever. I want to use something I can use in VS interactave search/replace, but
can't find the reference.

Notice that there is a 'Help' button in the replace dialog box that
contains a description of the buttons and options in the dialog and
references to the documentation for the regular expression
search/replacement feature.
 
That did the trick.

Thanks - JackRazz at sbcglobal dot net



"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
| US Phone Number Match
|
| ((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}

|
| --
|
| OHM ( Terry Burns )
| . . . One-Handed-Man . . .
|
| Time flies when you don't know what you're doing
|
| | > Could someone give me a very simple regular expression for Visual Studio's
| > search/replace using backreferences saving portions of the match as \1 or
| $1 or
| > whatever. I want to use something I can use in VS interactave
| search/replace, but
| > can't find the reference. Just a simple one is all I need.
| >
| > Thanks - JackRazz at sbcglobal dot Net
| >
| >
| >
| >
| >
|
|
 
Herfried,
I found that Help reference on regular expressions, but I missed that tag stuff
completely; mainly because I'm too new, didn't know what to look for, and needed an
example.

Thanks - JackRazz at sbcglobal dot net



| * "JackRazz" <[email protected]> scripsit:
| > Could someone give me a very simple regular expression for Visual Studio's
| > search/replace using backreferences saving portions of the match as \1 or $1 or
| > whatever. I want to use something I can use in VS interactave search/replace,
but
| > can't find the reference.
|
| Notice that there is a 'Help' button in the replace dialog box that
| contains a description of the buttons and options in the dialog and
| references to the documentation for the regular expression
| search/replacement feature.
|
| --
| Herfried K. Wagner [MVP]
| <URL:http://dotnet.mvps.org/>
 
Back
Top