ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

If you have 1000 static html page, is there a way to change all phone numbers format in those pages?

user-image
تم إضافة السؤال من قبل Mohammad Ateieh , Software Engineering Manager , Bayt.com
تاريخ النشر: 2013/08/30
George Dimitrov
من قبل George Dimitrov , Unix System Administrator , ADVANCED.IO

The function is in edit menu ( http://www.activestate.com/komodo-edit )Search and replace in files

Basm allah alrahman alrahim

 

There are a lot of ways , My strange way is to use Command from CMD [ far a way subject from web developers ! ] , use this command to replace any text inside any file at the same folder [ be aware to make a backup copy of that folder because any mistake may appear ] , the command is

FART -i -r "C:\\Directory Name\\Files\\*.html" FOO BAR

 

and before use this command you must download FART Tool and put it at the same folder of your1000 files then from windows7 click start or hit windows key and type cmd at search box , when cmd appear right click it and run as administrator then change your directory to the folder you save the1000 files [don't forget the backup ]for example if your folder at d:\\saved , write the following , cd d:\\saved then run the command FART -i -r   "D:\\saved\\*.html"   "19-9-2015"   "19 sep2015"

 

you can observe the date format you want to replace with at the part  "19-9-2015"   "19 sep2015" [ put what inside the HTML files at the first part and the second part is what new format you want ]

 

To download FART go to sourceforge

and don't forget to put the downloaded file after uncommpressed at the same folder of the1000 BC

Shibin Philip
من قبل Shibin Philip , Consultant Web Developer , inmobi.com

1. Use regular expression to search and replace in files. We can use supported editors like notepad++ 

2. Use preg_replace and write a php script to update each files. 

Nouphal Muhammed
من قبل Nouphal Muhammed , Senior Web Developer , Planet Green Solutions

Regular expression supported text editors are a good choice. But if all the pages include any common js files then a simple js function will also do the job. Using js would be better, i think, because u can simply edit the regex pattern and format if there are anny future changes.

هاشم المشارقة
من قبل هاشم المشارقة , Key Account Manager , Advanced United Systems Ltd. ( A member of Taj Holding Group)

if you want to change the style only you can use CSS with an external style sheet.

Zaid Samee
من قبل Zaid Samee , Administrator, Documents Controller & IT Support Technician , German Medical Solutions [www.gms-projects.com]

Use an advanced text editor. It will be the solution for you. Thanks

Yes. By using dreamweaver. Open one file in that location and go for "find & replace" option. Your job is done in mins.

Muhammad Majid Saleem
من قبل Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech

If all1000 html pages has a same number to be replaced with1 new number then follow the instructions below:

- Open a file in Adobe DreamWeaver.

- Run FIND & REPLACE action for this replace.

- Don't forget to choose FOLDER which has all file for above action.

- It will replace all files in a moment.

 

Enjoy Working !!

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟