regular expression not working

S

sathya

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 @: (e-mail address removed)
 
R

RobG

sathya said:
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.
 
S

sathya

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...
 
S

sathya

hi danny,
Is regexp works fine in macintosh pc's also where i am running my
safari btowsers

thanks
sathya narayanana
 
C

Christopher J. Hahn

sathya said:
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);
?
 
R

Randy Webb

Danny said:
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


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?
 
M

Michael Winter

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
 
R

Randy Webb

Michael said:
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.
I doubt understanding has anything to do with this; refusal is more
accurate.

Probably so :)
 
M

Michael Winter

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
 
R

Randy Webb

Michael said:
On 04/07/2005 18:50, Randy Webb wrote:




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.
 
R

Randy Webb

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 :(
 
R

RobG

sathya said:

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]);
">
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Mon, 4 Jul
2005 04:29:45, seen in Randy Webb
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 <[email protected]> :-
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.
 
M

Michael Winter

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
 
M

Michael Winter

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
 
R

Randy Webb

Michael said:
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? :)
 
H

Hallvord R. M. Steen

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 :)
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.
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top