List Info

Thread: character minus between word




character minus between word
country flaguser name
United States
2007-03-30 10:36:43
hi to all
i use php. i would to match a string that have before and
after the
minus character only letters.
I tried this
(?<=[a-z]+)-(?=[a-z]+)

the variable length lookbehind doesn't exist but in php in
particular
conditions it's possible (i don't understand very well when
it can).

How can i do this with regexp?

thanx

--
Andrea


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


Re: character minus between word
country flaguser name
United States
2007-04-02 06:59:50
what u r doing here is matching on a HYPHEN alone, while
your stated
task is

***i would to match a string that have before and after the
minus character only letters.***

for that you need to use

[a-z]+-[a-z]+

it'll match on say

str-str


On Mar 30, 11:36 am, "andrea azzini"
<azzo...gmail.com> wrote:
> hi to all
> i use php. i would to match a string that have before
and after the
> minus character only letters.
> I tried this
> (?<=[a-z]+)-(?=[a-z]+)
>
> the variable length lookbehind doesn't exist but in php
in particular
> conditions it's possible (i don't understand very well
when it can).
>
> How can i do this with regexp?
>
> thanx
>
> --
> Andrea


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )