Solved

Problem with more issues on JSOn format data

Posted on 2011-09-20
8
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

 
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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
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…

717 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