473,465 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

regular expression not working

hi,

i have used regexp javascript which works fine in IE, Mozilla and
Netscape. But i cannot figure out problem in safari browsers. My
regular expression is not captured in safari browsers. Is there any
solution for making common regular expression for all browsers.
And whether safari supports all kind of basic regular expression.

Thanks
regards,
sathya narayanan
mail @: na*******@gsdindia.com

Jul 23 '05 #1
17 1657
sathya wrote:
hi,

i have used regexp javascript which works fine in IE, Mozilla and
Netscape. But i cannot figure out problem in safari browsers. My
regular expression is not captured in safari browsers. Is there any
solution for making common regular expression for all browsers.
And whether safari supports all kind of basic regular expression.


There are no specific issues with regular expressions and Safari,
perhaps if you post a small sample of code that displays the
behaviour someone can provide a better answer.

--
Rob
Jul 23 '05 #2
hi robg,

my sample code below:

var zoneTag = new RegExp("<ns[0-9]*:Zone .*?>","gim");
var zoneTagArr = zoneTagRegExp.exec(bodyContent);
alert(zoneTagArr[0]);

here i am searching for string that contains <ns2:Zone sathya...>
my code works well in IE , firefox , netscape, but it shows bug in
safari...
please can you help me in this regar...

Jul 23 '05 #3

Can't say I know on Safari, but the regexp looks fine to me.

Danny

On Sat, 02 Jul 2005 08:33:26 -0700, sathya <sa***************@gmail.com>
wrote:
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #4
hi danny,
Is regexp works fine in macintosh pc's also where i am running my
safari btowsers

thanks
sathya narayanana

Jul 23 '05 #5
sathya wrote:
hi robg,

my sample code below:

var zoneTag = new RegExp("<ns[0-9]*:Zone .*?>","gim");
var zoneTagArr = zoneTagRegExp.exec(bodyContent);
alert(zoneTagArr[0]);

here i am searching for string that contains <ns2:Zone sathya...>
my code works well in IE , firefox , netscape, but it shows bug in
safari...
please can you help me in this regar...


Maybe I missed something but shouldn't this:
var zoneTag = new RegExp("<ns[0-9]*:Zone .*?>","gim");
var zoneTagArr = zoneTagRegExp.exec(bodyContent);

be
var zoneTagRegExp = new RegExp("<ns[0-9]*:Zone .*?>","gim");
var zoneTagArr = zoneTagRegExp.exec(bodyContent);
?

Jul 23 '05 #6
Danny wrote:

Can't say I know on Safari, but the regexp looks fine to me.

Danny

On Sat, 02 Jul 2005 08:33:26 -0700, sathya
<sa***************@gmail.com> wrote:
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


Is your broken style of posting due to the "revolutionary" client you
are using or is it that you just don't understand how to post properly,
in accordance with the FAQ, in this group?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #7
On 04/07/2005 09:29, Randy Webb wrote:
Danny wrote:
[top-post]
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


Is your broken style of posting due to the "revolutionary" client you
are using


Now, now. Don't be dragging Opera through the mud. :P
or is it that you just don't understand how to post properly, in
accordance with the FAQ, in this group?


I doubt understanding has anything to do with this; refusal is more
accurate.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jul 23 '05 #8
Michael Winter wrote:
On 04/07/2005 09:29, Randy Webb wrote:
Danny wrote:

[top-post]
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Is your broken style of posting due to the "revolutionary" client you
are using

Now, now. Don't be dragging Opera through the mud. :P


I actually like Opera, and was trying to give him the benefit of the
doubt as I have never used the Opera Email Client. I looked at it in O8
last night but didn't have time to try to use it.
or is it that you just don't understand how to post properly, in
accordance with the FAQ, in this group?

I doubt understanding has anything to do with this; refusal is more
accurate.


Probably so :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #9
On 04/07/2005 18:50, Randy Webb wrote:

[snip]
I actually like Opera,
Excellent. :)
and was trying to give him the benefit of the doubt
I think I've mentioned not to top-post at least four times in replies,
and I noticed Richard did too quite recently. Others might have in
threads I didn't read.
as I have never used the Opera Email Client.


I did for several months and then switched to Thunderbird after
reinstalling XP. The only thing I didn't really like was wrapping; it
was fixed at 80 characters and I always ended up having to wrap manually
before posting. I suggested changes, but I haven't used M2 in O8, so I
don't know if anything's been implemented.

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jul 23 '05 #10
Michael Winter wrote:
On 04/07/2005 18:50, Randy Webb wrote:


<snip>
as I have never used the Opera Email Client.

I did for several months and then switched to Thunderbird after
reinstalling XP. The only thing I didn't really like was wrapping; it
was fixed at 80 characters and I always ended up having to wrap manually
before posting. I suggested changes, but I haven't used M2 in O8, so I
don't know if anything's been implemented.


I think I am going to play around with it this week to see how I may/may
not like it. I use Thunderbird right now but have never had time to sit
and go through it to find how to change the things I would want to
change. Might give me something to do in some free time, and who knows,
might start using O8 for news instead.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #11
On Mon, 04 Jul 2005 17:40:29 -0400, Randy Webb <Hi************@aol.com>
wrote:
Michael Winter wrote:
On 04/07/2005 18:50, Randy Webb wrote:


<snip>
as I have never used the Opera Email Client.

I did for several months and then switched to Thunderbird after
reinstalling XP. The only thing I didn't really like was wrapping; it
was fixed at 80 characters and I always ended up having to wrap
manually before posting. I suggested changes, but I haven't used M2 in
O8, so I don't know if anything's been implemented.


I think I am going to play around with it this week to see how I may/may
not like it. I use Thunderbird right now but have never had time to sit
and go through it to find how to change the things I would want to
change. Might give me something to do in some free time, and who knows,
might start using O8 for news instead.


This is being posted with Opera 8's email client. One thing it does that
is counter-productive is that it puts the cursor at the beginning (top) so
as to make top-posting seem "normal" (much the way Outlook does). It is
also still wrapping at 80 characters. Yuck!

The above was just typed in, so going to post it to see how it wraps it on
its own.

If this is indicative of being "revolutionary" though, I think I will
stick to Thunderbird for a while :(

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #12
sathya wrote:
hi robg,

Sorry, got sidetracked and forgot about this thread.
my sample code below:

var zoneTag = new RegExp("<ns[0-9]*:Zone .*?>","gim");
------------------------------------^

You may want to change that to '+' to match one or more digits rather
than zero or more (up to you).
var zoneTagArr = zoneTagRegExp.exec(bodyContent);
Here's your issue --------^^^^^^

var zoneTagArr = zoneTag.exec(bodyContent);

alert(zoneTagArr[0]);

here i am searching for string that contains <ns2:Zone sathya...>
my code works well in IE , firefox , netscape, but it shows bug in
safari...
please can you help me in this regar...


Test (works in Firefox and Safari but not IE on Mac):

<input type="button" value="Click me" onclick="
var txt = '<ns223:Zone sathya blah blah>';
var zoneTag = new RegExp('<ns[0-9]*:Zone .*?>','gim');
var zoneTagArr = zoneTag.exec(txt);
alert(zoneTagArr[0]);
">
--
Rob
Jul 23 '05 #13
JRS: In article <ue********************@comcast.com>, dated Mon, 4 Jul
2005 04:29:45, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Danny wrote:

Can't say I know on Safari, but the regexp looks fine to me.

Danny

On Sat, 02 Jul 2005 08:33:26 -0700, sathya
<sa***************@gmail.com> wrote:
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


Is your broken style of posting due to the "revolutionary" client you
are using or is it that you just don't understand how to post properly,
in accordance with the FAQ, in this group?


The FAQ has not been updated for a long time; in particular, while it
does describe the desired effect, it does not say how to get it when,
like Danny, one is using Google.
Danny, if you find that, when you start a News reply, Google does not
provide the previous article in quoted form, note what Keith Thompson
wrote in comp.lang.c, message ID <ln************@nuthaus.mib.org> :-
If you want to post a followup via groups.google.com, don't use
the "Reply" link at the bottom of the article. Click on "show
options" at the top of the article, then click on the "Reply" at
the bottom of the article headers.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #14
On 05/07/2005 16:57, Dr John Stockton wrote:

[snip]
The FAQ [...] does not say how to [post properly] when, like Danny,
one is using Google.


But Danny isn't using Google. That's why his signature says he posts
using Opera, as does the User-Agent header. :P

Opera is perfectly capable of forming properly formatted posts. He
/refuses/ to.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jul 23 '05 #15
On 04/07/2005 22:51, Randy Webb wrote:

[snip]
One thing [M2] does that is counter-productive is that it puts the
cursor at the beginning (top)
I found that to be fairly convenient as I could just press Down a couple
of times to wherever I was going to start typing and, well, start typing. :)
so as to make top-posting seem "normal" (much the way Outlook does).
No, OE is much worse. It shifts the attribution and quoted text down to
produce an inviting space to type a reply. If the user has a signature,
that's included above the attribution, too.

All M2 does is put the cursor on the same line as the attribution; the
signature is still in the right place.
It is also still wrapping at 80 characters. Yuck!
There's no defense against that. I would have hoped that it was fixed by
now.

[snip]
If this is indicative of being "revolutionary" though, I think I will
stick to Thunderbird for a while :(


I'm not sure where the 'revolutionary' thing comes from. Perhaps it was
the first integrated mail client before the Mozilla Suite software? I
don't know.

We have an Opera employee reading this group from time-to-time. Perhaps
he might take note. ;)

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jul 23 '05 #16
Michael Winter wrote:
On 05/07/2005 16:57, Dr John Stockton wrote:

[snip]
The FAQ [...] does not say how to [post properly] when, like Danny,
one is using Google.

But Danny isn't using Google. That's why his signature says he posts
using Opera, as does the User-Agent header. :P

Opera is perfectly capable of forming properly formatted posts. He
/refuses/ to.


Isn't that typical troll-ish behavior though? :-)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #17
On Tue, 05 Jul 2005 20:40:04 +0200, Michael Winter
<m.******@blueyonder.co.uk> wrote:
We have an Opera employee reading this group from time-to-time. Perhaps
he might take note. ;)


Hey, was that a bait?
Sorry to answer even though it's really off-topic. To clear my conscience
I set an appropriate follow-up :)
It is also still wrapping at 80 characters. Yuck!


There's no defense against that. I would have hoped that it was fixed by
now.


It is possible to turn wrapping off in the preferences.
You can alternatively edit the accounts.ini-file:

Linelength=76

It is a per-account setting.
If this is indicative of being "revolutionary" though, I think I will
stick to Thunderbird for a while :(


I'm not sure where the 'revolutionary' thing comes from. Perhaps it was
the first integrated mail client before the Mozilla Suite software? I
don't know.


It's the automated filtering (e.g. auto-detecting mailing lists,
automatically sorting by contacts) and smart search options we thought was
revolutionary. You know, when GMail says "search, don't sort" - we did it
first, and search works much faster since all your mail is locally stored
:)

Anyway, for features see
http://www.opera.com/products/desktop/m2/

<semi-semi-on-topic>It also supports filtering by regular
expressions.</semi-semi-on-topic>
--
Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
http://www.opera.com/
Opera - simply the best Internet experience
Jul 23 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kenneth McDonald | last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make...
11
by: Martin Robins | last post by:
I am trying to parse a string that is similar in form to an OLEDB connection string using regular expressions; in principle it is working, but certain character combinations in the string being...
2
by: Sehboo | last post by:
Hi, I have several regular expressions that I need to run against documents. Is it possible to combine several expressions in one expression in Regex object. So that it is faster, or will I...
6
by: Ludwig | last post by:
Hi, i'm using the regular expression \b\w to find the beginning of a word, in my C# application. If the word is 'public', for example, it works. However, if the word is '<public', it does not...
3
by: Zach | last post by:
Hello, Please forgive if this is not the most appropriate newsgroup for this question. Unfortunately I didn't find a newsgroup specific to regular expressions. I have the following regular...
25
by: Mike | last post by:
I have a regular expression (^(.+)(?=\s*).*\1 ) that results in matches. I would like to get what the actual regular expression is. In other words, when I apply ^(.+)(?=\s*).*\1 to " HEART...
6
by: rorymo | last post by:
I have a regular expression that allows only certain characters to be valid in an xml doc as follows: <xs:pattern value="^*" /> What I want to do is also allow any unicode character that is...
4
by: carlos | last post by:
I am working on a regular expression validation for my search page. What I have so far works for most cases, but I would like to fine tune it some. I am new to regular expressions, and I do not...
18
by: Lit | last post by:
Hi, I am looking for a Regular expression for a password for my RegExp ValidationControl Requirements are, At least 8 characters long. At least one digit At least one upper case character
10
by: venugopal.sjce | last post by:
Hi Friends, I'm constructing a regular expression for validating an expression which looks as any of the following forms: 1. =4*++2 OR 2. =Sum()*6 Some of the samples I have constructed...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
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...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.