Hello,
I use a library to parse an iCalendar file, but I don't understand the regex to split property.
iCalendar property has 3 different style:
BEGIN:VEVENT
DTSTART;VALUE=DATE:20080402
RRULE:FREQ=YEARLY;WKST=MO
The library uses this regex that I would like to understand:
var matches:Array = data.match(/(.+?)(;(.*?)=(.*?)((,(.*?)=(.*...
Currently I have
Input: e.g., '123456789'.'+'.'987654321'
Desired Pattern:
Output: e.g., '123456789987654321'
How can I achieve this using in php ? I am not through on regex and so what regex would go in preg_replace for this ?
...
Hello,
I am trying to find every "a -> b, c, d" pattern in an input string.
The pattern I am using is the following :
"^[ \t]*(\\w+)[ \t]*->[ \t]*(\\w+)((?:,[ \t]*\\w+)*)$"
This pattern is a C# pattern, the "\t" refers to a tabulation (its a single escaped litteral, intepreted by the .NET String API), the "\w" refers to the well know...
Context
I'm parsing some code and want to match the doxygen comments before a function. However, because I want to match for a specific function name, getting only the immediately previous comment is giving me problems.
Current Approach
import re
function_re = re.compile(
r"\/\*\*(.+)\*\/\s*void\s+(\w+)\s*::\s*function_name\s*\...
In Perl, I would write:
$x = "abbbc";
$x =~ s/(b+)/z/;
print "Replaced $1 and ended up with $x\n";
# "Replaced bbb and ended up with azc"
How do I do this in Python -- do a regular-expression string replacement and record what it was that got replaced?
...
Hi.
Tumblr and other blogging websites allows people to post embeded codes of videos from youtube and all video networks.
but how they filter only the flash object code and remove any other html or scripts? and even they have an automated code that informes you this is not a valid video code.
Is this done using REGEX expressions? And ...
Hi there,
Been struggling with replacing a backslash by another symbol such as '.-.' just to indicate the position of backslashes as I could not send a string such as 'C\xampp\etc.' through url as GET variable so I thought I'd first replace the backslashes in that string by another symbol, then send through url, and then replace them ba...
Hello everyone! I have regexp to change smileys to images. Here it is
(?:(?![0]:\)|:\)\)|:-\)\)))(:\)|:-\))
The point is not to change 0:) and :)) and :-)) while changing :) and :-)
It works pretty well with :)) and :-)) but somehow still grabs :) in 0:)
Where's my mistake?
...
<?php
$a="php.net s earch for in the all php.net sites this mirror only function
list online documentation bug database Site News Archive All Changelogs
just pear.php.net just pecl.php.net just talks.php.net general mailing
list developer mailing list documentation mailing list What is PHP? PHP
is a widely-u...
Hi,
I want a regex pattern to find all the words of this format [xyzblab23la].
For example if the text has something like the following,
Lorem Ipsum dolor[32a] ameit[34]
I should be able to find the [32a] and [34]. Please tell me what is the regex for this pattern?
...
Hi,
How does the following grep function works (what does !/0o1Iil]/ do? )
@chars = grep !/0o1Iil]/, 0..9, "A".."Z", "a".."z";
use Data::Dumper;
print Dumper @chars;
to produce the following in @chars?
$VAR1 = 0;
$VAR2 = 1;
$VAR3 = 2;
$VAR4 = 3;
$VAR5 = 4;
$VAR6 = 5;
$VAR7 = 6;
$VAR8 = 7;
$VAR9 = 8;
$VAR10 = 9;
$VAR11 = 'A';
$VAR1...
Hi I need a regular expression that'll give me something like this part
./something\", [something.sh
from something like this string
("./something\", [something.sh", ["./something\", [something.sh"], [/* 37 vars */])
is that possible? I'm having real trouble making this since there's that \" escape sequence and also that ',' chara...
I want to open a URL and RegEx all the image's URLs from the page.
Then I want to cURL all of them and check what size they have. In the end I want to get the biggest one. How do I do this?
...
How can I fix this?
REGEX:
//REGEX
$match_expression = '/Rt..tt<\/td> <td>(.*)<\/td>/';
preg_match($match_expression,$text,$matches1);
$final = $matches1[1];
//THIS IS WORKING
<tr> <td class="rowhead vtop">Rtštt</td> <td><img border=0 src="http://somephoto"><br /> <br />INFO INFO INFO</td>
</tr>
//THIS IS NOT WORKING...
I would like to remove a trailing slash from a string. For example if i have a string called
$test = "test/". How would I remove the slash at the end?
...
using System;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
namespace Working
{
class Program4
{
static string errorurl =
"http://www.realtor.ca/propertyDetails.aspx?propertyId=8692663";
static void Main(string[] args)
{
string s;
s = ge...
Hello,
I need a regular expression to parse a text The directory is
/home/foo/bar/hello.txt.
I would like to get the hello.txt and get rid of the rest of the directory, so i would like to delete home/foo/bar/ and only get the hello.txt
...
I am fluent with Microsoft Visual 2005 regular expressions and they are a big time saver.
I seem to learn them best by having a vaguely organized cheat sheet thrown at me, at which point I read just a little and play with them until I understand what's going on. That learning approach has worked well for me, for now.
I would really lik...
I have text with file names scattered throughout. The filenames appear in the text like this:
|test.txt|
|usr01.txt|
|usr02.txt|
|foo.txt|
I want to match the filenames that don't start with usr. I came up with (?<=\|).*\.txt(?=\|) to match the filenames, but it doesn't exclude the ones starting with usr. Is this possible with regular...
i have a file in which time appears nearly hundred times
like
00:01:32
00:01:33
00:01:36
.......................
how can i add 2 seconds or 2 minutes to all the times in the file so that i get
00:01:34
00:01:35
00:01:38
..................
...