List Info

Thread: Need one Regular Expression - Urgent




Need one Regular Expression - Urgent
user name
2006-01-06 14:54:33
As long as you're using the same product for implementation,
I think
you'll have to go with its results.

I did try the JavaScript RegExp tester at:

http://www.regular-expressions.info/javascriptexample.
html

...and got the same results as the VBA one -- two submatches
for each
match, but the first one is blank.

Need one Regular Expression - Urgent
user name
2006-01-11 00:42:26
> As long as you're using the same product for
implementation, I think
> you'll have to go with its results.

At the end of the day, you'll indeed have to accept the
results of the
regex engine you're using for the actual implementation,
including all
its bugs and limitations.

> I did try the JavaScript RegExp tester at:
>
> http://www.regular-expressions.info/javascriptexample.
html

This tester's results will depend on the JavaScript
implementation of
your web browser.

In all the regexes in this thread, I noticed everybody is
using what I
call a "lazy dot": .*?  I haven't tried any of the
regexes, but I'll
bet many can be improved by replacing the lazy dot with a
negated
character class.  E.g. instead of <a href=".*?"
use <a
href="[^"<>rn]+"  You know that URLs
can't contain quotes, line
breaks or angle brackets, so tell the regex engine. 
Remember that if
whatever you put in the regex after <a
href=".*?" fails to match, the
regex engine will expand the .*? to include the closing
quote, etc.,
all the way to the end of the subject string if need be. 
With multiple
.*? in a regex, you're setting yourself up for some pretty
heavy
backtracking, as I explain at
http:/
/www.regular-expression.info/atomic.html

Kind regards,
Jan Goyvaerts
--
RegexBuddy makes regular expressions easy.
http://www.regexbuddy.com/


Need one Regular Expression - Urgent
user name
2006-01-13 10:01:18
hi,
  the link you provided, was very informative. i learnt the
dis advt.s
of lezy and greedy operator.

can you tell me what could be the soultion for my Query. if
you not
have read the postings from the begining plz go through them
and tell
me how can i exctract href value from the anchor and the
value that is
between the anchor tag.

i think this way you can provide little analysis to us to
get more
understanding on memory management and performance
improvment

Need one Regular Expression - Urgent
user name
2006-01-16 07:01:15
> can you tell me what could be the soultion for my Query

I'm sorry, but I really don't have time to provide anybody
with
personal support on regular expressions.  I suggest you get
yourself a
copy of RegexBuddy at http://www.regexbuddy.com/
 and work your way
through the regular expression tutorial and practice various
patterns
in RegexBuddy.

Kind regards,
Jan Goyvaerts

[1-10] [11-14]

about | contact  Other archives ( Real Estate discussion Medical topics )