Solved

Problem with more issues on JSOn format data

Posted on 2011-09-20
8
181 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

DevOps Toolchain Recommendations

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

Question has a verified solution.

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

Suggested Solutions

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
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…

776 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