Search Results

Search found 3 results on 1 pages for 'ferol'.

Page 1/1 | 1 

  • PHP regular expression

    - by Ferol
    such text: $text = ' href="http://yahoo.com" target="_blank"> link text </a> text... text... <br> text...'; // $text = ' text... <a href="http://yahoo.com" target="_blank"> link text </a> text... text... <br> text...'; and such regular expression: preg_match_all('/^(.*)(<.+>)(.*)(<\/.+>)(.*)$/',$text,$matches); what I want, - to check if text matches the regular expression. If yes, then $matches should contain parts of string above, if not (as I guess) it should contain four zero-length arrays. something is wrong, but I can't find, what actually is?

    Read the article

  • dynamic xpath expression

    - by Ferol
    Good day, colleagues! Tell me please, how to make a dynamic xpath-parsing: for example, instead of writing $domXPath-query('//[(@id = "article-id-18")]'); - write something like that $domXPath-query('//[(@id = "article-id-*")]');, because in my case, the site's script generate (every time) a new id for block, that contains article's text? So question, is above.

    Read the article

  • php, checking correctnes of text splitting

    - by Ferol
    I need to split html document on two parts. First part, should contain N(30) words, and next one should contain everything else. And the main problem, is to prevent splitting tags (description and body of tags). Give me please suggestions (or if you have already written such function, please share your code), how to realize it! Thanks.

    Read the article

1