|
by: Bhargava |
last post by:
Hello,
I am a newbie to python and need some help.
I am looking at doing some batch search/replace for some of my source
code. Criteria is to find all literal strings and wrap them up with
some macro, say MC. For ex., var = "somestring" would become var =
MC("somestring"). Literal strings can contain escaped " & \.
But there are 2 cases when this replace should not happen:
|
by: Stevie |
last post by:
Hello
I'm trying to work out the regular expression for carrying out a simple
'greater than' comparison.
I have a directory with files such as asd345.log, asd346.log,
asd347.log and so on.
|
by: skavan |
last post by:
Hi,
I'm just wrapping my head around regex and am pretty sure it can do the
task at hand - but it's too complex for my brain to process -- so am
throwing it out there for you experts to comment on. I am posing two
questions. In the interests of space and focus, I'll post a separate
thread for the other use case (clustering).
Use Case 1:
Filenames contain a TrackNumber (or not).
|
by: writebrent |
last post by:
I think I need to do a negative lookahead with a regular expression,
but I'm a bit confused how to make it all work. Take these example
texts:
Need to match these two:
=========================
Item 4.01 Regulation and other items
<b>Item 4. Regulation</b>
|
by: MrNobody |
last post by:
is there a simple way to make it so your regex only matches whole words?
i was thinking simply something like:
*match_string*
but then I think it would fail if the word was at the beginning or end of a
line?
|
|
by: Gary Bond |
last post by:
Hi All,
Being a bit of a newbie with regex, I am confused when using word boundaries.
For instance, I want to replace all the stand alone '.5k' that occur in an
input string, with 500. In other words
"this is a .5k example" goes to "this is a 500 example"
The replace should not touch '.5k' that occurs inside a word. For example:
|
by: pedrito |
last post by:
I have a regex question and it never occurred to me to ask here, until I saw
Jesse Houwing's quick response to Phil for his Regex question.
I have some filenames that I'm trying to parse out of URLs.
(href=("|')http://.www\.thesite\.com/.{1,7}/)(?<filename>.)
This generally works, but the problem is some of the image files have
..th.jpg at the end to indicate thumbnails. I want to exclude those. I just
want the ones that don't have...
|
by: Jeremy |
last post by:
I am trying to replace a string "P" with "\P" as long as the string "P" does
not already have a "\" in front.
for my search string I've used @"(P)" so my regex replace statement is:
System.Text.RegularExpressions.Regex pR = new
System.Text.RegularExpressions.Regex(@"(P)");
string strResult = pR.Replace(@"This is a XP test X\P", @"\P");
The poblem is that the statement replaces XP with \P where I want it to be
|
by: Smokey Grindel |
last post by:
Alright so I have a string... that can be anything like this then have a
number like 102.34m, yes there is a m behind it to say "this is money", no I
didn't design the spec thats just how data comes in... well I had a regex
that replaces all those m's in a string where there is a number before it
with no m... so its just the string with 102.34... well this worked fine
until we got negative money! so now when its -102.34m it still has the...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|