1
vote
2answers
17 views

Regex with possible empty matches and multi-line match

I've been trying to "parse" some data using a regex, and I feel as if I'm close, but I just can't seem to bring it all home. The data that needs parsing generally looks like this: <param>: ...
-1
votes
4answers
20 views

PHP Pattern Match to change date format

What I'm trying to achieve is fairly straight forward, to get one date format to another; From This: Jan 30 2013 12:00:00:000AM To This: DD/MM/YYYY or in this case 30/01/2013 However, when it's the ...
-3
votes
2answers
28 views

Extract two values from text [on hold]

I'm trying to obtain two values with php regex in this kind of strings: bla bla bla Measures: 10,4 cm x 9 cm. bla bla bla Results: 1: 10,4 (note: decimal values with comma) 2: 9 The pattern ...
0
votes
1answer
29 views

Parsing string with PHP to remove speicifc character

I have string in following formats: ABC 318 XY2388 OR ABC 318 XY02388 and I want them to become "ABC 318/XY 2388". So if there is any leading zero after the second batch of letters then remove ...
0
votes
1answer
33 views

Capturing Words in HTML tag

I want to know what is the most regular optimized to capture keywords in an HTML text expression. Note that I am using PHP. I have a piece of HTML code like this: ... <li><span ...
1
vote
2answers
20 views

How construct this regex to find multiline string ended with first occurrence of a string?

I am trying to match all multiline strings that start with "id="SomeDiv"> and end in "<!-- someComment". My regex isn't working because "<!-- someComment" occurs multiple times, so it's ...
-6
votes
0answers
43 views

PHP regex string to validate a phone number [on hold]

Here are the default phone numbers used in Afghanistan: +93785657024 +93795657024 +93700565656 +93775657024 The regex validation first should make sure that 937 is used, then make sure that 8, 7, 9 ...
0
votes
1answer
15 views

Modifying .htaccess rewrite rule for MVC application

This is the rewrite rule I currently use for my MVC application: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/([^/]+)(/([^/]+))?$ ...
0
votes
3answers
26 views

How to use regex in php to replace ALT and TITLE text in html

I have a html content as listed below. <img title="" style="float: none;margin-right: 10px;margin-top: 10px;margin-bottom: 10px;" ...
0
votes
2answers
35 views

Convert JavaScript Regex String to PHP Regex String

I have JavaScript regex string and want to convert it to php regex. Here is the string for JavaScript: /(937(?:00\d{6}|[789]\d{7} This validate phone numbers. Acceptable format of phone numbers ...
0
votes
2answers
51 views

Regex to trim html whitespace at end

A textfield may be padded with combinations of <p></p> <p>&nbsp;</p> <br> <span></span> <div></div> and several other variations, ...
0
votes
1answer
28 views

Parsing this string with regex PHP

I have string in format as below: ABC 318 XY2388 I tried to use preg replace function in PHP with Regex but having no knowledge of reg ex I am not getting anywhere. I want above string to end up ...
1
vote
6answers
89 views

preg_replace THIS_IS_MY_VAR to thisIsMyVar

Need to transform PROP_RESOURCE_TYPE to propResourceType or setPropResourceType Number of _ and string length are not fixed. I'm not really into preg_replace, could you help me out
1
vote
2answers
38 views

regex validation not parsing string in if PHP

Here is the deal... I am suppose to parse a Canadian Postal Code (CapsLetterNumberCapsLetterNumberCapsLetterNumber: exemple A1B2C3 or G2V3V4) IF there is one. I have this code (PHP): //Create new ...
-1
votes
0answers
35 views

Search for vine videos [on hold]

I would like to know if there is any way to search videos on vine using php/ javascript. i have checked for for API but seems like vine still doesn't have an official API. But i have seen sites ...

1 2 3 4 5 772
15 30 50 per page