preg-match with a string and numbers


Posted on 16th Feb 2014 07:03 pm by admin

Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the string, but only if it is accompanied by a letter, not a number. So if a string was found with a number after it, it would pass, but fail if there where letters.
I have this but it doesn't work:

if(!preg_match("/table-/+[abcdefghijklmnopqrstuvwxyz]", $string, $dump)) {
//do stuff
}
Thanks for any help.

338 Like 39 Dislike
Previous php-forum Next php-forum
Other php-forum

Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

regex for quoted text within a string
I am still getting the hang of regex expressions, but I cant seem to figure out how I would escape q

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash