This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

String Match...

Old posts that have not been replied to for several years.
Locked
J
Jimbo

Post by Jimbo »

I am trying to match something with spaces..but i cant seem to do it...Here is an example (x is a character and y is a space nad z could be a character or a space): xxxyxxyzxxxx

Cheers for any help in advance!!
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

string match or regexp both let you match chars/spaces.

A string match pattern would look like "* * *" (that would match anything with 2 spaces).

A regexp regular expression can be more detailed:

regexp {^S+sS+ss?S+$} $text
J
Jimbo

Post by Jimbo »

Cheers!!!
Locked