Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » php » regex
Showing page 1 of 2 (14 total posts)
  • 2 days of mental block!

    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 ...
    Posted to Construction Advice (Forum) by johnbasham on March 7, 2011
  • How to match same pattern existing inside pattern?

    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 ...
    Posted to Construction Advice (Forum) by www on February 13, 2011
  • (PHP) Regex to capture list of field=value

    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) ...
    Posted to Construction Advice (Forum) by tesco on November 5, 2010
  • find if either stringa or stringb do not exist in a string

    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, ...
    Posted to Construction Advice (Forum) by sarathi on July 31, 2009
  • text format

    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 ...
    Posted to Construction Advice (Forum) by mirceasoaica on July 1, 2009
  • Help me filtering html code

    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 ...
    Posted to Discussion (Forum) by tenyks on June 8, 2009
  • Markup tag parser

    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 ...
    Posted to Construction Advice (Forum) by simonrobb on January 21, 2009
  • PHP scrape and regex problems ... how to exclude?

    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 ...
    Posted to Construction Advice (Forum) by Tomas Johansson on November 28, 2008
  • only the word coming after a value (PHP)

    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" ...
    Posted to Construction Advice (Forum) by sayim on August 24, 2008
  • Matching quotes strings with escaped quotes with multiple occurances

    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 ...
    Posted to Construction Advice (Forum) by badgerx on June 2, 2008
1 2 Next >