
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 :/ -- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be ==================================================================

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 :/
-- ================================================================== Sebastian Proost PhD Student Tel:+ 32 (0) 9 33 13 822 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM sebastian.proost@psb.vib-ugent.be http://www.psb.ugent.be ================================================================== "If I knew what I was doing, it wouldn't be called research." --Albert Einstein

I used this one (for searching in an hmmsearch-output) and it worked for me. The range from 1 to 5 is a bit arbitrary though. (\d{1,5}\.?\d{0,5}e?[+-]?\d{0,5}) Esther. 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 :/
-- ================================================================== Esther-Kristin Lather Tel:+32 (0)9 331 38 25 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM eslat@psb.vib-ugent.be http://bioinformatics.psb.ugent.be/ ==================================================================

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

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
-- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be ==================================================================

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
participants (4)
-
Esther-Kristin Lather
-
lieven sterck
-
Michiel Van Bel
-
Sebastian Proost