• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

Problem with more issues on JSOn format data

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
Gurpreet Singh Randhawa
Asked:
Gurpreet Singh Randhawa
  • 4
  • 4
1 Solution
 
Terry WoodsIT GuruCommented:
Update which regex? Please post a link to the question. Thanks
0
 
Gurpreet Singh RandhawaWeb DeveloperAuthor Commented:
acceted answers regex by kauf
0
 
Terry WoodsIT GuruCommented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Gurpreet Singh RandhawaWeb DeveloperAuthor Commented:
well it do handle single quote character also
0
 
Terry WoodsIT GuruCommented:
Adding a single quote to the pattern:
ReReplace(myString, '([\'<=("/\\\b\f\n\r\t]|\\u[a-fA-F0-9]{4})', '\\\1', 'ALL')
0
 
Gurpreet Singh RandhawaWeb DeveloperAuthor Commented:
what we are doing this '\\\1'
0
 
Terry WoodsIT GuruCommented:
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
 
Gurpreet Singh RandhawaWeb DeveloperAuthor Commented:
Have not tested but i hope it will work!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now