|
by: Xah Lee |
last post by:
suppose you want to do find & replace of string of all files in a
directory.
here's the code:
©# -*- coding: utf-8 -*-
©# Python
©
©import os,sys
©
©mydir= '/Users/t/web'
|
by: Barnes |
last post by:
Does anyone know of a good way to use the JavaScript string.replace() method in an ASP form?
Here is the scenario:
I have a form that cannot accept apostrophes. I want to use the replace() so that the apostrophe is
automatically replace with two '' . Reason being--SQL Server does not like apostrophes being sent to database.
I've tried to...
|
by: Jane Doe |
last post by:
Hi,
I need to search and replace patterns in web pages, but I
can't find a way even after reading the ad hoc chapter in New Rider's
"Inside JavaScript".
Here's what I want to do:
function filter() {
var items = new Array("John", "Jane");
|
by: Barnes |
last post by:
Hi,
Can anyone please tell me how I can use the replace method to replace
a character if it occures in more than one textbox without having to
write separate function for each textbox.
The code below is the basic way to use the replace method but it only
allows for one textbox.
I'm sure I need a loop in there but I'm not sure how to...
|
by: David P. Donahue |
last post by:
I'm using RegExp.Replace(string, string, string) to remove some pieces
of large strings. But I seem to be having trouble getting it to match
"all characters up to and including xxxxx" (which I thought would be
".*xxxxx" but it's not working). I can get it to match more precise
segments no problem, but not "all characters up to and including...
|
|
by: Xah Lee |
last post by:
Interactive Find and Replace String Patterns on Multiple Files
Xah Lee, 2006-06
Suppose you need to do find and replace of a string pattern, for all
files in a directory. However, you do not want to replace all of them.
You need to look at it in a case-by-case basis. What can you do?
Answer: emacs.
|
by: Michael Yanowitz |
last post by:
Hello:
I am hoping someone knows if there is an easier way to do this or someone
already implemented something that does this, rather than reinventing the
wheel:
I have been using the string.replace(from_string, to_string, len(string))
to replace names in a file with their IP address.
For example, I have definitions file, that looks...
|
by: Umesh |
last post by:
Do you have any answer to it? thx.
|
by: alainfri |
last post by:
I am not sure if this group is the right place for this question but
what I need is as follows. There is a piece of html. Throughout the
html there are a lot of <brtags. The task is to replace all these
<brtags with \n\r. The replacement must be performed only within
<preblocks. I can do this using VBScript in the following way:
Option...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|