\A matches only the start ^ matches after every line break. If you have
only a single line the two are the same.
If you look two
lines<https://github.com/ajasja/spectraplotpy/blob/importer/spectraplotpy/importer.py#L58>down,
you will see that whitespace is perfectly fine before the number. But
this was easier to implement with a simple strip then expanding an already
complex regex.





On 11 April 2014 19:34, lidiabressan <notifications@github.com> wrote:

> In spectraplotpy/importer.py:
>
> >
> > +    data_lines = []
> > +    meta_lines = []
> > +    #matches any line that starts with a number.
> > +    number_re = re.compile('\A[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?')
>
> one question: what is the difference between \A and ^ in regular
> expressions?
> I would also take into account the possibility of having white spaces in
> front '' *"
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/SpectralGroup/spectraplotpy/pull/30/files#r11542787>
> .
>