Find and Replace (Regular Expression) Dreamweaver MX

42 views Asked by At

I am using Dreamweaver MX (yes, I know it is ancient!) and need some help with the Find and Replace (Regular Expression) function.

I am looking to change the line of numbers found this campid=123456789& (for example - there are several hundred variables) to this exact code campid=5339025591&

I have tried several variations found in answers to similar questions here but nothing seems to work. Any advice will be gratefully received!

2

There are 2 answers

1
Kishan Kisu On

Sure, I can help with that. In Dreamweaver MX, you can use the Find and Replace function with Regular Expressions to achieve this. Here's how you can do it:

  1. Open the Find and Replace dialog box. You can do this by going to Edit > Find and Replace.

  2. In the Find in dropdown, select Source Code if you want to search the entire source code.

  3. In the Search dropdown, select Specific Tag. In the adjacent field, enter campid.

  4. In the Find field, enter the following regular expression: campid=\d+&. This will match any line that starts with campid=, followed by one or more digits (\d+), and ends with &.

  5. In the Replace field, enter campid=5339025591&.

  6. Click Replace All.

This should replace all instances of campid=123456789& (and any other number) with campid=5339025591&.

Please remember to backup your files before performing a Find and Replace operation on the source code. Let me know if you need further assistance!

1
pixel On

In the Find field, enter the below regular expression to match the old campid value:

campid=\d+&

This regular expression will match campid= followed by one or more digits and ending with &.

In the Replace field, enter the new desired campid value:

campid=5339025591&

Check the "Regular expression" option.

do Find All once to see we are on the right track and then Replace All and done.