Hi. I'm not good at all with regular expressions, so maybe someone can
help me with this: I need to create a regular expression that accepts
everything except the word upload. The regular expression for
everything is this: [a-zA-Z_0-9]+, but how can I solve the second part
of my problem? Thank you! 4 1911
..oO(Cristisor)
>Hi. I'm not good at all with regular expressions, so maybe someone can help me with this: I need to create a regular expression that accepts everything except the word upload. The regular expression for everything is this: [a-zA-Z_0-9]+, but how can I solve the second part of my problem? Thank you!
You don't need a regex here. Simply use strpos() to check for the word
"upload".
Micha
On Oct 5, 7:59 pm, Michael Fesser <neti...@gmx.dewrote:
.oO(Cristisor)
Hi. I'm not good at all with regular expressions, so maybe someone can
help me with this: I need to create a regular expression that accepts
everything except the word upload. The regular expression for
everything is this: [a-zA-Z_0-9]+, but how can I solve the second part
of my problem? Thank you!
You don't need a regex here. Simply use strpos() to check for the word
"upload".
Micha
my problem is that I have e regular expression in a .yml file and I'm
using it for some kind of validation, to know when to include or not
something. so I don't think I can use strpos() in this file, right?
thanks for the help Micha
Cristisor wrote:
On Oct 5, 7:59 pm, Michael Fesser <neti...@gmx.dewrote:
>.oO(Cristisor)
>>Hi. I'm not good at all with regular expressions, so maybe someone can help me with this: I need to create a regular expression that accepts everything except the word upload. The regular expression for everything is this: [a-zA-Z_0-9]+, but how can I solve the second part of my problem? Thank you!
You don't need a regex here. Simply use strpos() to check for the word "upload".
Micha
my problem is that I have e regular expression in a .yml file and I'm
using it for some kind of validation, to know when to include or not
something. so I don't think I can use strpos() in this file, right?
thanks for the help Micha
Can you be more specific about what your overall goal is? Maybe
posting a sample of the yml file, and clearly showing what you're
trying to look at in the file would be more helpful.
You can read the yml file into a PHP string with file_get_contents,
and check for "upload" before including the file. strpos() would work
in the PHP file that does the including.
--
Curtis
This is how the .yml file look like:
dizy_WebApp[A-Za-z_]*:
[a-zA-Z_0-9]+:
- /overlib/overlib_mini.js
- /prototype/prototype.js
.........
browseCommunity|overview:
- /gadget.js
So for everything I include prototype.js and the other file for
overview I include also gadget.js, but there is one situation where I
don't want to include prototype.js because I'm including another
framework and this makes the application crash because they can't work
together. So either I give up including prototype.js everywhere and I
include manually in every file, or I find a regular expression that
doesn't allow me to include prototype when I'm in this module called
uploadImage. Thank you This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kenneth McDonald |
last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate
feedback, suggestions, and criticism as I work towards finalizing the
API and feature sets. rex is a module intended to make...
|
by: radawson218 |
last post by:
Hi,
I'm a complete newbie when using regular expressions, so forgive me if
my delimma sounds stupid.
I have an ASP.NET app that utilizes url rewriting. It's a simple
bookstore that allows...
|
by: Ramprasad A Padmanabhan |
last post by:
Hi all,
I am a perl programmer and a newbie in C. Can Someone tell me How
Can I use regular expressions in C ( on Unix ) .
Suppose I am parsing a string like
"Ram Prasad" <ram@netcore.co.in>...
|
by: Marc Scheuner [MVP ADSI] |
last post by:
Folks,
I've started using regular expressions for parsing some data string
that come along - works quite nicely, however, as a newbie to RE, I'm
still struggling with some special cases:
1) I...
|
by: Buddy |
last post by:
Can someone please show me how to create a regular expression to do the
following
My text is set to
MyColumn{1, 100} Test
I want a regular expression that sets the text to the following...
|
by: Laser Lu |
last post by:
Hi, all,
I'm now writing a program to compress JavaScript code. One puzzle is how
to write a regular expression to find out and remove all the redundent blank
spaces. However, those blank spaces...
|
by: Billa |
last post by:
Hi,
I am replaceing a big string using different regular expressions (see
some example at the end of the message). The problem is whenever I
apply a "replace" it makes a new copy of string and I...
|
by: Mike |
last post by:
I have a regular expression (^(.+)(?=\s*).*\1 ) that results in
matches. I would like to get what the actual regular expression is.
In other words, when I apply ^(.+)(?=\s*).*\1 to " HEART...
|
by: John Blogger |
last post by:
(I don't know if it is the right place. So if I am wrong, please point
me the right direction.
If this post is read by you masters, I'm honoured. If I am getting a
mere response, I'm blessed!)
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |