alternatively, better use the char-class approach: with the [ ]  eg. \d+[ (e-)|\. ]\d+

Michiel Van Bel wrote:
Yeah, well... It's actually the perl regular expression matcher of PHP 
... So I guess there might be some caveats that I'm not aware of .

lieven sterck wrote:
  
with me they both work :-/
but...
ALWAYS be careful when using the ' | ': actually it says in your 
regex: \d+ or 0 it does NOT refer to the previous chars only the one 
just in front of the pipe.
if you group them with () then it says what you want to it to say.

L.

Sebastian Proost wrote:
    
Michiel Van Bel schreef:

Maybe something like this works ? I can't see why yours doesn't work though.

(\d*(e-|\.)\d+)


  
      
Okay,

I need a small regexp to recognize e-values .
I thought this one would suffice:
(\d*e-\d+|0\.\d+)

But apparently it only recognizes:

e-126
2e-20
1e-09
0.001
0.004
0.015

And not:
0.23 
0.90 

Can anyone tell me why this is the case? I'm slightly confused :/




  
    
        
  
      
-- 
==============================================================
Lieven Sterck, PhD

Tel:+32 (0)9 3313821                       Fax:+32 (0)9 3313809
VIB Department of Plant Systems Biology, UGent
Bioinformatics and Evolutionary Genomics Division
Technologiepark 927,         B-9052 Gent,             Belgium
Email: lieven.sterck@psb.vib-ugent.be
Website: http://bioinformatics.psb.ugent.be

==============================================================
"Facts are meaningless. You could use facts to prove anything 
that's even remotely true!" H. Simpson
  
------------------------------------------------------------------------

_______________________________________________
Binari Implicitly Neglects All Recursive Iterations
https://maillist.psb.ugent.be/mailman/listinfo/binari
  
    


  

-- 
==============================================================
Lieven Sterck, PhD

Tel:+32 (0)9 3313821                       Fax:+32 (0)9 3313809
VIB Department of Plant Systems Biology, UGent
Bioinformatics and Evolutionary Genomics Division
Technologiepark 927,         B-9052 Gent,             Belgium
Email: lieven.sterck@psb.vib-ugent.be
Website: http://bioinformatics.psb.ugent.be

==============================================================
"Facts are meaningless. You could use facts to prove anything 
that's even remotely true!" H. Simpson