Jump to content

Some Problems With Regular Expression


hunglduc

Recommended Posts

The If clause is activated when the If statement is true.The else clause is only activated when the If statement is false.Only one of them should work.

Link to comment
Share on other sites

I think he's asking why that regular expression matches. The reason is, you are asking whether there are any non-alphabetic characters in the string "welcome to php", and since the spaces " " are not included in the set [a-z] the expression matches those and returns true.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...