Solved

Problem with more issues on JSOn format data

Posted on 2011-09-20
8
183 Views
Last Modified: 2012-05-12
now i encountered another issue, i get some openig ( and the <= or the < signs with the text

Experts Please update the Regex so i can skip that also

RegardsPlease refer previous question
0
Comment
  • 4
  • 4
8 Comments
 
LVL 35

Expert Comment

by:Terry Woods
ID: 36570359
Update which regex? Please post a link to the question. Thanks
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36571732
acceted answers regex by kauf
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 36571756
So this one is the one you're referring to, I think:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup_Language/Q_27302251.html

So maybe you want:
ReReplace(myString, '([<=("/\\\b\f\n\r\t]|\\u[a-fA-F0-9]{4})', '\\\1', 'ALL')

I've added the 3 characters <=( to the pattern. If that's not what you want, you might need to provide a more detailed explanation?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36572544
well it do handle single quote character also
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 36577459
Adding a single quote to the pattern:
ReReplace(myString, '([\'<=("/\\\b\f\n\r\t]|\\u[a-fA-F0-9]{4})', '\\\1', 'ALL')
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 36578555
what we are doing this '\\\1'
0
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 36578574
I just copied that from the previous question. I believe the \\\1 refers to the text captured from within the () brackets in the pattern for use as the replacement, which is all of the captured text; it actually seems to make the statement completely useless as it just puts back what it matched!

One of the other suggestions used an empty string as the replacement, which means the text captured by the pattern would be removed from the string. That is more likely to be what you want I think!

ReReplace(myString, '([\'<=("/\\\b\f\n\r\t]|\\u[a-fA-F0-9]{4})', '', 'ALL')
0
 
LVL 16

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 36890113
Have not tested but i hope it will work!
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question