-5
votes
0answers
18 views
How to create regular expression in php [closed]
I am trying to extract the string in php. Every string between " $field & value " should be extracted.
For example if I have this expression.
...
1
vote
2answers
9 views
restrict Apache RewriteRule to one forward slash per URL element
I have this Apache RewriteRule configured below, which has the problem that it allows the following URL without returning a HTTP 404 error.
...
0
votes
5answers
49 views
Jquery replace number in fixed location
I am writing a function which is used to replace the class of div in certain conditions, for example,
condition A - the div class is e_new_hazard_frame_2_1_4_7, I want to replace the 2 to 1, ...
-4
votes
0answers
31 views
Comprehensive Javascript URL Regex [closed]
I'm looking for a comprehensive URL regex like the one listed here
What is the best regular expression to check if a string is a valid URL?
However I'm having problems implementing that regex in my ...
0
votes
1answer
21 views
php regex templating + localization improvement
Because I am a pretty newbie in regex, I can't manage the following:
In many frameworks we use functions like __($key) to localize strings. It's not very practical, as we have much to type:
<?php ...
0
votes
1answer
46 views
Javascript WYSIWYG Editor with PHP parsing
I'm working with a prebuilt javascript WYSIWYG editor, and it automatically adds line breaks and paragraph tags where it thinks they're needed. How ever, it's adding stuff where it shouldn't be! One ...
1
vote
2answers
47 views
replace all links in text by Regular Expressions [php]
i want replace all links in text With the exception of images Links
$text = '<p>
<a href="http://msn.com" rel="attachment wp-att-7046"><img class="alignnone size-full wp-image-7046" ...
1
vote
6answers
49 views
remove “+” or “0” from a telephone number string
i need in php a regular expression to remove from a string of telephone numbers the + or the 0 at the beginning of a number
i have this function to remove every not-number characters
...
-9
votes
0answers
38 views
Need regular expression in php [closed]
I need a regular expression which should check if a given string contains:
- min 2 uppercase characters
- min 2 digits
- length of the string: min 8 characters
Thank you for any help
0
votes
2answers
63 views
Regex contain multiple string
I have many problem for understand regex, i'm not sure what I'm trying to do is possible.
I want a regex able to match with a string that contains "a" AND "b" in any order.
Example :
rrrarrbrr
...
1
vote
2answers
40 views
regex pattern to match words of a string
I have an Array() of strings , and i have ton compare it with a part of a word that it have to be the start of one of the words in each string !!!
With an example it will be much better :
...
0
votes
5answers
51 views
regEx is allowing letters inbetween numbers
Im trying to make some validation with javascript for a phone number field of a form.
I have taken some RegEx from another website and it almost works.
But the javascript does allow the form to ...
1
vote
4answers
60 views
String replace with regex in PHP
I want to modify the contents of an html file with php.
I am applying style to img tags, and I need to check if the tag already has a style attribute, if it has, I want to replace it with my own.
...
4
votes
3answers
69 views
Regex X and/or Y
Consider the following regular expression, where X and Y are any regex.
XY|YX|X|Y
This regex tests for X and/or Y, but has to double-check expressions if the "and" clause is not found.
What is the ...
0
votes
1answer
28 views
Mod Rewrite to a non existend direcotry
my problem is, that if I rewrite my URL with following rule
RewriteCond %{QUERY_STRING} ^site=meine-bar&filter=([a-zA-Z]+)$
RewriteRule ^meine-bar/([a-zA-Z]+)$ ...