The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Regex Programming
|
Page 2 -
Help with some regex
Page 2 - Discuss Help with some regex in the Regex Programming forum on Dev Shed. Help with some regex Regular expressions forum covering PCRE and POSIX techniques, practices, and standards. Regular expressions help shorten coding time by providing the ability to compact many lines of code into one string.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 15th, 2009, 09:34 AM
|
|
|
Quote: | Originally Posted by liamdawe Oh really then explain why my now working regex won't work unless i escape them?  |
Then your PCRE engine is very strangely compiled. In normal cases, you don't need to escape them. Period.
|

January 15th, 2009, 09:36 AM
|
 |
Contributing User
|
|
Join Date: May 2006
Location: England
|
|
You are right, it didn't work as i was escaping the [ in the second part of it still.
But re-read my other post with 5 points now, all true and needed for it to work.
For refence i use this now:
PHP Code:
// change quote html back to bbcode
$edit = preg_replace("#<div class=\"container\"><div class=\"box\">{$lang['quoting']}</div><div class=\"box2\">(.*?)</div></div>#s",'[quote]$1[/quote]',$edit);
|

January 15th, 2009, 09:37 AM
|
|
|
Quote: | Originally Posted by liamdawe Oh really then explain why my now working regex won't work unless i escape them?  |
Did you run the script I posted in reply #13? If so, what was the output?
|

January 15th, 2009, 09:39 AM
|
|
|
Quote: | Originally Posted by liamdawe You are right, ... |
Yes, I knew that.
And to be frank, you were acting like a smart@ss.
A good day to you.
|

January 15th, 2009, 10:29 AM
|
 |
Contributing User
|
|
Join Date: May 2006
Location: England
|
|
|
I was not acting like a "smart@ss" i was simply stating what i saw, which was wrong and i corrected myself by saying you was right, jeez some people are never happy.
Last edited by liamdawe : January 15th, 2009 at 10:32 AM.
|

January 15th, 2009, 10:44 AM
|
|
|
Quote: | Originally Posted by liamdawe I was not acting like a "smart@***" i was simply stating what i saw, |
Well, then our opinions of what a smart@ss is differ. I told you multiple times that < and > are not meta characters and you kept on repeating that they were and even gave me a smug response in reply #15.
I must confess that I was already a bit ticked of because you told me to not assume that you haven't tried. I mean, your post didn't give any proof of the fact that you DID try something before posting, and I told you in a normal fashion as to why it is a good idea to post what you have tried. IMO, there was no need to tell me what I should or shouldn't do or assume. It is you who was asking for help, not me.
Quote: | Originally Posted by liamdawe which was wrong and i corrected myself by saying you was right, |
I didn't say so before, but I appreciated that.
Quote: | Originally Posted by liamdawe jeez some people are never happy. |
Well, I am happy this thread is at it's end (well, almost...).
No worries, this is my last post in any of your threads.
|

January 15th, 2009, 04:14 PM
|
 |
Contributing User
|
|
Join Date: May 2006
Location: England
|
|
|
Well thanks anyway it is sorted and i do appreciate any help.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|