Announcement

Collapse
No announcement yet.

Patterns

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Patterns

    Hi,

    I am trying to match a text but I can't find the appropriate pattern.

    I basically have the text:

    <hello25>kjhgsadgdgldgagdsad</hello>
    <hello>jkhkjhdhdshdhdkj</hello>

    I am now using <hello25>(.*)</hello> and this is capturing:

    kjhgsadgdgldgagdsad</hello>
    <hello>jkhkjhdhdshdhdkj

    but I want to capture:

    kjhgsadgdgldgagdsad

    I basically want it to stop the match after finding the first </hello> or a certain number of </hello>'s.

    If anyone has any ideas please let me know!

    Thanks


  • #2
    preg pattern:
    "#<hello25>(.*)</hello>#iU"

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X