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

please help
HTML Code:

Code: <span id="ctl00"><span>

Vertical Alligning - Not working in 1 cell?
<?php

echo "<table id="valign" width="60%" style=

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",

substr(I_NAME, IN

How to use Ajax to verify data on a DB ?
Hello everyone, well i want to know how to check a value if it exists or not on a Data base and capt

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<

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