.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Find and replace link source

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :.NET Framework
I want to replace links href in the source code using regular expression in Find/Replace dialog box from http://www.abc.com/car-news/13PX5S/News1.aspx, http://www.abc.com/car-news/27JXW5/News2.aspx to http://www.abc.com/car-news/news1/13px5s/, http://www.abc.com/car-news/news2/27jxw5/   - in the resultant URL there will be no Capital letters.    

View Complete Post

More Related Resource Links

Change case using Find & Replace dialog box

Hi, I want to change case of link URLs using Find & Replace dialog box . Is it possible? eg changing http://www.abc.com/S pecial-E dition.aspx, http://www.abc.com/O ther-N ews.aspx to http://www.abc.com/s pecial-e dition.aspx, http://www.abc.com/o ther-n ews.aspx

Patch for VS 2010 Find and Replace Dialog Growing

One of the top reported Microsoft Connect issues with VS 2010 has been an issue with the Find and Replace dialog - which grows 16px each time you use it (which is pretty annoying). The Visual Studio team recently released a patch that fixes this issue. You can download and apply it here. Hope this helps, Scott P.S. A few people reported issues installing the patch if they had an older version of the Silverlight 4 tools installed.  If you see an error message that says you need an update to Visual Studio to support Silverlight 4, you can fix it by installing the latest Silverlight 4 tools release.

find and replace linebreaks in file read from disk

I have a css file which I want to read from disk and in that content I want to find and replace all linebreaks (do I look for vbCrlf or ...?)   Public Shared Function GetFileContents(ByVal FullFilename As String) As String        Dim filecontents As String = ""        If File.Exists(FullFilename) Then            Dim objStreamReader As StreamReader            objStreamReader = File.OpenText(FullFilename)            filecontents = objStreamReader.ReadToEnd()            objStreamReader.Close()        End If       Return filecontents    End FunctionSo in the returned variable "filecontents" I want to find and replace any linebreaks.        FILE: style.css#progress{color:#000;width:500px;height:30px;padding:0px;clear:both;}#progress ul{list-style:none;padding:0px;margin: auto;display:block;}#progress ul li{list-style:none;display:inline;float:left;width:auto;height:30px;padding:0px;line-height:30px; font-family:Arial, Helvetica, sans-serif; font-size:13px;}

Cancel multiple WFs at once & global list find & replace

We have a number of products in our company, and a need for an email alert for various reasons for each product. Thus, I have a SP list where each list item has a drop-dead date, plus the manager's name and manager's email address as well as a note as to what needs to be done. When a new item is created, or a list item is changed, a workflow is initiated. Remember, each single product associated with a manager can have dozens of these email alert list items with differing drop-dead dates. The workflow is designed to send alerts out at stated intervals before the drop-dead date. The problem is that the manager in charge of a given product can and does change. What I have to do now is to open each of the items that pertain to that manager, stop the existing workflow, change the manager's name and email address in the item, then save it (thus starting a new workflow). This can get tedious when a single product can have several dozen list items corresponding to several dozen drop-dead dates. I would like to be able to filter the list, kill all the workflows that are connected to each item in the filtered list, change the manager name and email using the Datasheet facility, then save. At that point, X new workflows would start where X is the number of list items in the filtered list. 1. Is that possible (I doubt it) in our native SP 2007? 2. Does anyone

Couldn't find local patch C:\WINDOWS\Installer\Blah.msp Looking for it at its source.

I get installer errors like this whenever I try to remove SQL 2005 Workstation Components or when I try to install a new named instance. In fact whatever I try to do that involves reading the installation media I get this type of missing file error. Does this indicate there a corruption in my installation media?

Web expression 3 and find/replace with a regular expression

I'm am trying to  delete some code in a javascript

<a href="JavaScript:openPopImg('images/Burgess-Rufus1.jpg', 'Rufus Morgan Burgess', '296', '589')">  I want to delete  ', 'xxx', 'xxx')  throughout the web.  I can not get  a regular expression going that will work; .i.e.  ^(\'\, \'[0-9]{3,}\'\, \'[0-9]{3,}\' \)) Am I anywhere near right or is there another way to do this?  Thanks.

Negative Lookbehind assertion to find all the strings from source code of particular pattern

I wrote a regular expression to match all the double quoted strings in the source code but excluding those which are initializers to const declaration.

My expression was 

The first group is const declaration of string type. Second is used to match double quoted strings capable of handling escape sequences.


If i simple run a match using second group, all the strings are matched. But if i use the entire expression, it provides me all the characters between the end double quote of last string and first double quote of next string.

Please help.


Can't find a link about Grant permission programmatically


Hi guys,


two weeks ago I read a MSDN(?) article how to grant/revoke permission for some users/roles/groups on a specific page or holder temporarily or with condion. The article shows how to do it Form_Load() in c#. But I can't find the link with googling or in MSDN library.

Please let me know if you know the url?

What I want to do is:

There is a folder called employeePDFs.

The folder will have 1000s employees' sub folder ({lastname}{firstname}{employeeID}). Each folder will have very personal indivual PDF files which are manually uploaded.

If an employee logs on, then the logon employee can view a page which has a list of PDF files in his own folder only.

Those PDF files can be assessed only by the user.

or better solution?




Content Query result without link to source list

I've added a content query webpart to a page to show a multiple line text field from a list item. That works fine but the content is shown as hyperlink and if I click the content, the source item of the list is shown. I wanted to use the content query only to show the filtered content, without having the possibility to open the related item. Is that possible or is the content query webpart the wrong way to show content from different sources (lists) only as text in a page?

Programatically Find and Replace the words in Word documents in SP Doc library

The client has uploaded 1000 of MS Word document in SP Document Library.
We have to change some specific text in all documents which we upload in a Sp Document Library.
We have to do this without opening a document.(i.e) we have to do find and replace a text programatically.
Please provide me the solution.
Rajanikanth Rayala

find and replace on regexp in selected text



I work in SQL Server Management Studio 9.00.1399.00

I have this text:


I search this regexp:

^{[^ ,]+}
and replace with this one:

o\.\1 = t\.\1

As result I expect this:

o.Column1 = t.Column1,
o.Column2 = t.Column2,
o.Column3 = t.Column3
Replace works fine when I search in Current Document. But it does not work in Selection. When I apply search and replace to selection, I get this result:

o. = t.,
o. = t.umn3
Is there any fix? Regexp never worked fine in SSMS, but usually I managed to find work around. Not this time.

Thank you,



Find and Replace is broken


If I open a Project in SSMS 2008, open Find and Replace, type in the name of a stored procedure, select Look in Current Project and click Find Next, F&R will open all the files in the project and report "...specified text was not found". If I click Find Next again it will then find the stored procedure.

How can I fix this?

Cannot find "Modify Shared Page" link



Im a web designer for our unit's team site (SharePoint 2003).  Before, I was able to modify the home page using the "modify shared page" link located on the upper-right corner but now, I only see "modify my page" option.

I tried going to Site Settings --> Customize Home Page and it opened the home page in shared view but when I click the "modify shared page", it only gave me 2 options: Shared View and Personal View. I dont have the option to design the shared page.

Has anyone encountered this and can share the solution? I elevated this to our SP admin but she doesnt seem to know why I can't modify the shared page. 

Thank you,


How do I find which Linked Data Source I've used?


I've got several Linked Data Sources, with different names, that I created for testing purposes, and all use the same 2 lists. How do I find which one I actually used in my DVWP? When clicking within the DVWP in question, the 'Data Source Detail's window only shows me the title of my DVWP, for the 'Current Data Source' at the top. I searched the code view but only found the names of the individual lists.

Thanks in advance for any help.


regexp to find and replace strings in UNIX


I currently use UltraEdit to edit my files, which it has an option to do a search and replace in all files in a directory. In my directory I have files that I need to replace stuff in all of them.

Replace: $_POST['SomeVariableThatIsUnknown']
With: fetchValue($_POST, 'SomeVariableThatIsUnknown')


The SomeVariableThatIsUnknown variable could include numbers or other special characters (really anything other than ' or ]). Can someone help me with the REGEXP to find these and then one to replace them?

Binding a ValidationRule property - Cannot find source for binding with reference 'ElementName=...'



I'm playing around with a custom ValidationRule that will make sure date 1 is less than date 2 (or visa versa). My ValidationRule exposes a public property for date2. If I want to explicitly set the date, that would be enough, but I wanted to be able to bind date2 to the SelectedDate of a DatePicker control. So I changed my ValidationRule's property type to a custom class, named DependencyDate, which exposes a date as a dependency property. Now I should be able to apply my ValidationRule to the binding on one DatePicker and bind the date 2 to another DatePicker's SelectedDate. The problem is, my binding is yielding the message "Cannot find source for binding with reference 'ElementName=dtEnd'". Here is the code:

<DatePicker Grid.Column="1" Name="dtStart">

Find (also "find and replace") not working in Visual Studio



  I am an senior .net developer. My Visual Studio 2005 was working properly for several months. I started on a new laptop and everything was fine. Suddenly (due to a windows update or something), the find (also the find and replace) is not working. When I do Ctl+F (or Edit-Find) or(Edit menu-find and replace) nothing happens. I see my visual studio going out of focus (similar to what happens if another window takes modal position).

I made sure that service pack 1 is installed. 

I repaired/re-installed and did other things to fix this problem but still no resolution. Any help would be greatly appreciated.  


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend