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)) {
Did you know?Explore Trending and Topic pages for more stories like this.
//do stuff
}
Thanks for any help.
No comments posted yet

Your Answer:

Login to answer
338 Like 39 Dislike
Previous forums Next forums
Other forums

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

Select Lists into MYSQL
Hello All, I am new to PHP @ 1 week. So borrowing code anywhere I can. I am making progress, but h

disabling a button server-side then re-enabling client-side breaks button postback
I have a tabbed container and a button (not in the container) on a page. If the first tab is selecte

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

Validating time
Hi Guys

what do you think of the following approach to validate a 24hour time:

http://

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