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.

No comments posted yet

Your Answer:

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

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

cURL Upload Help
OK, I am creating a bridge from a local program to my website and I am trying to find the best way t

Menu restriction
How can I restrict the individual menu that would appear when a user logs in so that all users are c

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: function createthumb($name,$filename,$n

Keeping data in form
How can I keep whatever I write in the form?

Cannot Connect to Database
I am writing an application to do annual reviews. I cannot get my script to work. Whenever it runs I

Can't shake the "Warning: include()" error
I've just uploaded my site to a new server and where I have PHP include tags in my HTML, the browser

help, header() is not working!
Hello, I have this code:


<?php

/**
* @author samoi
* @copyright 200

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

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