Re: Get regular expression




Mike wrote:
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 (CONDUCTION
DEFECT) 37.33/2 HEART (CONDUCTION DEFECT) WITH
CATHETER 37.34/2 " the expression is "HEART (CONDUCTION DEFECT)". How
do I gain access to the expression (not the matches) at runtime?

Thanks,

Mike


Isn't the zero-th match (or group?) the string you're searching?

.



Relevant Pages

  • Re: Get regular expression
    ... "HEART (CONDUCTION DEFECT)" is not an expression. ... The regular expression is the string ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Find repeating substring
    ... I need a regular expression to find repeating substrings (in ... the substring of interest would be "HEART (CONDUCTION ... HEART (CONDUCTION DEFECT) 37.33/2 HEART WITH ...
    (comp.lang.perl.misc)
  • Re: Get regular expression
    ... I would like to get what the actual regular expression is. ... do I gain access to the expression at runtime? ... you want to access the expression "HEART (CONDUCTION DEFECT)" or the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Get regular expression
    ... I would like to get what the actual regular expression is. ... do I gain access to the expression at runtime? ... you want to access the expression "HEART (CONDUCTION DEFECT)" or the ...
    (microsoft.public.dotnet.languages.csharp)
  • Get regular expression
    ... I would like to get what the actual regular expression is. ... DEFECT) 37.33/2 HEART (CONDUCTION DEFECT) WITH ... do I gain access to the expression at runtime? ...
    (microsoft.public.dotnet.languages.csharp)

Loading