|
by: Magnus Lie Hetland |
last post by:
I'm working on a project (Atox) where I need to match quite a few
regular expressions (several hundred) in reasonably large text files.
I've found that this can easily get rather slow. (There are many
things that slow Atox down -- it hasn't been designed for speed, and
any optimizations will entail quite a bit of refactoring.)
I've tried to speed this up by using the same trick as SPARK, putting
all the regexps into a single or-group in...
|
by: Pavils Jurjans |
last post by:
Hallo,
I yesterday was browsing the book, JavaScript The Definitive Guide
(4th ed), which is, unquestionably, the best reference book for JS. To
my surprise, I didn't find any documentation about the static
properties of global RegExp object, ie, RegExp.lastMatch,
RegExp.leftContext, RegExp.rightContext, and all those RegExp.$x
properties. I lloked up the ECMA-262 PDF and to my surprise realized
that they are not included into the...
|
by: jasonkester |
last post by:
Just a heads up for anybody that comes across this in the future.
Noticed a strange behavior in RegExp.test() today. Check out the
following code. It will alternately display "chokes" and null, as
every second call to .test() fails.
<script>
var str = "RegExp (chokes) on this every 2nd time";
var re = /chokes/g;
|
by: brad |
last post by:
Hello all, I'm new to javascript--not too new to a few other
programming languages--and I need your help deciphering the Regexp in
the following string. Regular expresions are hard enough in Python, and
since I am new to javascript they are even harder. Well here's the
string, thanks for any and all help I receive.
document.URL.match(/^(.+?)(?:\?(?:(.*?)@)?(.+))?$/)
|
by: Csaba Gabor |
last post by:
I need to come up with a function
function regExpPos (text, re, parenNum) { ... }
that will return the position within text of RegExp.$parenNum if there
is a match, and -1 otherwise.
For example:
var re = /some(thing|or other)?.*(n(est)(?:ed)?.*(parens) )/
var text = "There were some nesting parens in the test";
alert (regExpPos (text, re, 3));
|
|
by: HopfZ |
last post by:
I coudn't understand some behavior of RegExp.test function.
Example html code:
----------------
<html><head></head><body><script type="text/javascript">
var r = /^https?:\/\//g;
document.write( );
</script></body></html>
---------------------
|
by: runsun pan |
last post by:
Hi
I am wondering why I couldn't get what I want in the following 3 cases
of re:
(A)
var p=/(+-?+):(+)/g
p.exec("style='font-size:12'")
-- // expected
|
by: Uldis Bojars |
last post by:
Hi All,
I have encountered problems with JS RegExp.exec() and can't find what
is the problem. Could you help me?
formRequest is a function that extracts some information from
XMLHTTPRequest response. A very strange effect (and I can't find where
I've done something wrong) is that regexp matches in this function fail
on every second call.
|
by: chris fellows |
last post by:
In VS2005 (C#) I want to set the properties of an object dynamically at
runtime from an XML configuration file but without having to know the
property name when writing the code. The properties are user-defined classes
so I need to be able to iterate through the properties of each sub-object
and set the property accordingly.
For example, Instead of having to write the code
MyObject.SubObjectOne.MyStringProperty = "Some text" I will...
|
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: 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: 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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
|