473,378 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Simple Regex for Alpha-Numerics?

I'm doing a check for only alpha-numerics, but I wanna try it with a regex.
Something like this:

$bReturn = is_alphanum($sString).

Can somebody help me do this with regular expressions?

Nov 3 '07 #1
1 1761
On Nov 3, 6:14 pm, "Sanders Kaufman" <bu...@kaufman.netwrote:
I'm doing a check for only alpha-numerics, but I wanna try it with a regex.
Something like this:

$bReturn = is_alphanum($sString).

Can somebody help me do this with regular expressions?
Any particular reason you really need a regex? Why not use this:

<http://www.php.net/ctype_alnum>

Nov 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Chamomile | last post by:
I have to split strings of the type: $str1 =' Large ladies hats 1.365 0.334'; $str2 = 'Pins 0.335 0.22'; into separate variables (or array members) : say,...
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
7
by: alphatan | last post by:
Is there relative source or document for this purpose? I've searched the index of "Mastering Regular Expression", but cannot get the useful information for C. Thanks in advanced. -- Learning...
9
by: Tim Conner | last post by:
Is there a way to write a faster function ? public static bool IsNumber( char Value ) { if (Regex.IsMatch( Value.ToString(), @"^+$" )) { return true; } else return false; }
0
by: sd | last post by:
Are any of the special range metacharacters allowed in RegEx operations(System.Text.RegularExpressions) . If so how could you please specify an example. Thx! sd Only the digits 0 to 9 Any...
4
by: skavan | last post by:
Use Case: We have music files that describe, in their filename, attributes of the music. We do not know a general pattern that applies to all filenames -- but we do know that filenames that are...
1
by: JM | last post by:
Hi, I am pretty new to regex, and I am trying to find a why to do: 1) I have a paragraph "... the black monkey (gamma5) is the one who develop the first inmunoresitance to alpha-23 also...
5
by: Phillip Vong | last post by:
Can someone help me write a simple regex that require a textbox start with http:// or https:// ? I don't know how to write regex. I usually rely on http://regexlib.com but I couldn't find...
10
by: igor.kulkin | last post by:
I have a small utility program written in Python which works pretty slow so I've decided to implement it in C. I did some benchmarking of Python's code performance. One of the parts of the program...
3
by: aspineux | last post by:
My goal is to write a parser for these imaginary string from the SMTP protocol, regarding RFC 821 and 1869. I'm a little flexible with the BNF from these RFC :-) Any comment ? tests= def...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.