DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Vlad Ivanov Guest

    Re: Regular expressions matching problem....


    "Vlad Ivanov" <vb.@127.0.0.1> wrote:
    >
    >


    Sorry - prematurely pressed enter.

    Looking for assistance with the following problem:

    I have a string: "ASIO(9) M-AUDIO(9) AUDIGY(9)"

    I have a pattern: "\b(.+)\((\d)\)\b"

    For some reason it doesn't find anything, though according to my calculations
    it should find "M-AUDIO(9)"

    Any ideas?



  2. #2
    Vlad Ivanov Guest

    Re: Regular expressions matching problem....


    After a moment of panic i have found the solution - problem lies in a "greedy"
    expression and the fix appears to be in making it not "greedy".

    "Vlad Ivanov" <vb.@127.0.0.1> wrote:
    >
    >"Vlad Ivanov" <vb.@127.0.0.1> wrote:
    >>
    >>

    >
    >Sorry - prematurely pressed enter.
    >
    >Looking for assistance with the following problem:
    >
    >I have a string: "ASIO(9) M-AUDIO(9) AUDIGY(9)"
    >
    >I have a pattern: "\b(.+)\((\d)\)\b"
    >
    >For some reason it doesn't find anything, though according to my calculations
    >it should find "M-AUDIO(9)"
    >
    >Any ideas?
    >
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links