|
|
Browse by Tags
All Tags » php » regex
Showing page 1 of 2 (14 total posts)
-
Okay I have spent two days on a mental block in PHP using the stristr() command.
Here's the deal.
A simple text file loaded in as a string where the following needs to be found in the string:
beginning of line, three periods a space, some word or two words, a space and three periods
EXAMPLES: ... WORD ONE ...
-
I have this kind of strings:
{test1|test2|test3}
This is easy to match with something like:
~{(.*?)}~
But I would like to be able to match strings like:
{test1|test2|test3{subtest1|subtest2}}
or
{test1|test2|test3{subtest1|subtest2{subsubtest1|subsubtest2|subsubtest3}}}
I can't figure out how I could match that in the ...
-
Using PHP.
Here is a few examples of strings that I am working with: part=1 total=1 line=128 size=2799 name=name.of.file.12-group.nfo
part=2 total=3 line=128 size=2124 name=different name of file.rarBasically I need to match the field name (part, total, size, name, but there can be any combination of these and possibly others as well) ...
-
I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works:
/(?!\[code\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?<!\[\/code\])/Usi
what I want it to do is if [*code] and [*/code] are around the text inside, ...
-
Hello.
I have a text like this :
Lorem Ipsum is simply dummy text of the printing and
typesetting industry. {onpage} { more}Lorem Ipsum has been the industry's standard
dummy text ever since the 1500s, when an unknown printer took a galley
of type and scrambled it to make a type specimen book.{end} It has ...
-
Hi,
sorry to bother you with such an easy question, but I'm new to using regex, so I'm trying to find an answer to my question.
Here's what I try to filter:
<a href="showthread.php?t=12456" id="thread_title_601468" rel="nofollow" style='font-weight:bold'>Name of the ...
-
Hi there
I'm trying to put together a parser in PHP for a custom markup language. The regex needs to be able to pick up from a string 'Lorem<FOO foo=bar>Ipsum dolor</FOO>blah blah':
Any text before an opening bracket (in sample: Lorem)The element name\attributes (in sample: FOO foo=bar)The inner content between ...
-
Got a problem ... I've got a php-script that scrapes a schedule system for a school ... The output/feed will be displayed as a ticker (Jticker) at the bottom of information monitors around the buildings. The scrape works just fine and the feed as well, I've even managed to modify it so that it passes with no-errors at feedvalidator.org ...
-
Hi,
I am learning regex nowadays.
Now, i am stuck because i cant find how to do it anywhere.
I need to retrieve a word coming after a value.
For example, i need to retrieve the value of the PPFT below:
<input type="hidden" name="PPFT" id="i0327" ...
-
Hi there,
After hours of searching i found nothing that worked. I've got the following string and i want to match all parts between single quotes. It has to deal with user input so the next example is valid: (the both outer double quotes are to show what the sentence is)
"hello world, this is a 'quoted string' using ...
1
|
|
|