balzar Posted August 8, 2007 Share Posted August 8, 2007 I am implementing some very simple wiki rules therefore in a wiki content I need to find "=Heading1=", "==Heading 2==" and onwoards in order to replace it with <h1>,<h2> tags. The closes solution i have so far is '/={1}([^=].+?)={1}/' but it does not work properly. Please help!!! Link to comment https://forums.phpfreaks.com/topic/63905-matching-wiki-like-rules-for-html-headers/ Share on other sites More sharing options...
effigy Posted August 8, 2007 Share Posted August 8, 2007 1. You don't need to specify {1} because the = is a--one--literal; this is assumed by default. 2. If you need to match multiple =s, use =+. 3. You don't need the .. The +? should apply to the character class. Link to comment https://forums.phpfreaks.com/topic/63905-matching-wiki-like-rules-for-html-headers/#findComment-318553 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.