String Replacement in 'HTML 5 FireFox'
-
Hello Community, I have created Regex with Regex Magic with HTML 5 Firework, see attached. The Regex [A-Za-z]{3}\d{4} successfully finds a string such as GMK6954 using Character Spaces. Can someone help with modifying the Regex such that it replaces the first 3 letters with --- so the resulting Regex will generate the following 6954 Thanks
-
Hello Community, I have created Regex with Regex Magic with HTML 5 Firework, see attached. The Regex [A-Za-z]{3}\d{4} successfully finds a string such as GMK6954 using Character Spaces. Can someone help with modifying the Regex such that it replaces the first 3 letters with --- so the resulting Regex will generate the following 6954 Thanks
Change you digits to a "excluded suffix" and use String.prototype.replace() - JavaScript | MDN[^]:
[A-Za-z]{3}(?=\d{4})
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Change you digits to a "excluded suffix" and use String.prototype.replace() - JavaScript | MDN[^]:
[A-Za-z]{3}(?=\d{4})
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Hi Griff, Thanks for reaching out. Unfortunately, it didn't work. The replacement just returns [A-Za-z]{3}(?=\d{4})
-
Hi Griff, Thanks for reaching out. Unfortunately, it didn't work. The replacement just returns [A-Za-z]{3}(?=\d{4})
And how - exactly - did you try it?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
And how - exactly - did you try it?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Is it possible to send an attachment on this forum I would like to send a screenshot to you.
-
Is it possible to send an attachment on this forum I would like to send a screenshot to you.
No. Copy'n'paste the relevant code fragments.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
No. Copy'n'paste the relevant code fragments.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Hi, sorry for the delayed response. I wanted to show you a screenshot, because I'm not getting an error from the application I'm using. It's replacing the string with [A-Za-z]{3}(?=\d{4}) Let me know if you can see the screenshot from the link below? regmagic2.png - Google Drive[^]
-
Hi, sorry for the delayed response. I wanted to show you a screenshot, because I'm not getting an error from the application I'm using. It's replacing the string with [A-Za-z]{3}(?=\d{4}) Let me know if you can see the screenshot from the link below? regmagic2.png - Google Drive[^]
And what do you think that tells me about how you coded it? To quote myself:
Quote:
And how - exactly - did you try it?
If you go for a drive and break down, when you call the garage, do you send them a picture of the view you can see out the car window? Or tell them what happened and where you are?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
And what do you think that tells me about how you coded it? To quote myself:
Quote:
And how - exactly - did you try it?
If you go for a drive and break down, when you call the garage, do you send them a picture of the view you can see out the car window? Or tell them what happened and where you are?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
I dont understand. Did you see the screenshot? I simply cut-and-paste your regex I should point out the regex I originally sent was not generated by me - I simply got the regex using an application called RegexMagic. I am 100% new to Regex. This means, I really don't have a clue what you're referring to. Please help
-
I dont understand. Did you see the screenshot? I simply cut-and-paste your regex I should point out the regex I originally sent was not generated by me - I simply got the regex using an application called RegexMagic. I am 100% new to Regex. This means, I really don't have a clue what you're referring to. Please help
Code. A regex doesn't exist in isolation - it has to be used in code in order to do anything. On it's own, it's just a string ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
I dont understand. Did you see the screenshot? I simply cut-and-paste your regex I should point out the regex I originally sent was not generated by me - I simply got the regex using an application called RegexMagic. I am 100% new to Regex. This means, I really don't have a clue what you're referring to. Please help
:wtf: What does it take to get you to copy and paste the code you're using where you're setting up and using this RegEx?
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
:wtf: What does it take to get you to copy and paste the code you're using where you're setting up and using this RegEx?
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakHi Dave, Sorry for the delayed response The reason for wanting to show a screenshot is because I use application to insert the a Search and Replace regex. So I would enter [A-Za-z]{3}\d{4} in the Search dialogue box, and [A-Za-z]{3}(?=\d{4}) in the replace dialoge box. The search regex works fine, but the replace regex returns [A-Za-z]{3}(?=\d{4}) I'm assuming the the Regex pattern HTML 5 FireFox doesn't allow for replace?
-
Hi Dave, Sorry for the delayed response The reason for wanting to show a screenshot is because I use application to insert the a Search and Replace regex. So I would enter [A-Za-z]{3}\d{4} in the Search dialogue box, and [A-Za-z]{3}(?=\d{4}) in the replace dialoge box. The search regex works fine, but the replace regex returns [A-Za-z]{3}(?=\d{4}) I'm assuming the the Regex pattern HTML 5 FireFox doesn't allow for replace?
You're making a lot of baseless assumptions and STILL not providing what is needed to solve the problem.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
You're making a lot of baseless assumptions and STILL not providing what is needed to solve the problem.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave KreskowiakDave, I'm not sure I could be any clearer. If you looked at the image you would see exactly what happens when I insert the Regex
-
Dave, I'm not sure I could be any clearer. If you looked at the image you would see exactly what happens when I insert the Regex
Never heard of DataCleaner. Don't use it and not going to start. If it's some tool you found somewhere, your best source of support is going to be whoever wrote it. Your BIGGEST mistake was never telling anyone you were using some tool to do this work instead of writing your own code to do it.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak