ereg 2 question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

ereg 2 question

Post by pelegk2 »

1)
how can i check if the first letter is one of
a-z or A-Z

2) how can i check hebrew letters that therevalues are :
chr(224)-chr(250)
?
thnaks in advance
peleg
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please do not start multiple topics on the same question - it would be much better if you put the additional information in the existing thread.

Mac
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

What do the strings you want to test look like - i.e. echo it out and post the source code.

Mac
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

what i want ot check is simple is there
an english letter and right after it a hebrew letter
OR
hebrew letter and right after it an english letter
where the char code of the hebrew letters is between :
224 to 250
how do i do that?
thanks in advance]peleg
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

What does the generated string look like? It's near on impossible to write a regular expression without knowing what the string to compare looks like.

Mac
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

here is the string

Post by pelegk2 »

נירוקריל אפור פלטין‏267‏NL‏ דלי ‏18‏ל
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

here it wuthogu unicode (so i hope)

נירוקריל אפור פלטין‏267‏NL‏ דלי ‏18‏ל
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

and now...

Post by pelegk2 »

Code: Select all

נירוקריל אפור פלטין‏267‏NL‏ דלי ‏18‏ל
Post Reply