[yunqa.de] Re: RegEx with '/'

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 04 Mar 2009 18:25:48 +0100

Alex wrote:

>I have subject: www.site.ww/path/some/
>Pattern: [\w\./]+\b
>Result: selected url *without last '/'. How to get last '/'?

The last '/' is not included because your pattern requests that it must end in 
a word break (\b) whereas '/' does not qualify for a word letter. The match 
includes the '/' if you remove that assertion:

  [\w\./]+

Ralf 

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: