I might be missing something
-
So you are having a lie down in the Lounge? :laugh: :laugh:
Silence is golden... but duct tape is silver!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
Calvin was practicing drums, and I was waiting on the other end of hte house for him to finish...
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Calvin was practicing drums, and I was waiting on the other end of hte house for him to finish...
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Christian Graus wrote:
I was waiting on the other end of hte house for him to finish...
FTFY :laugh:
It’s always a pleasure to help when your efforts are appreciated...
-
Ok try this and give me your feedback:
s=c&vl=vlg&vi=\d*^p$
It’s always a pleasure to help when your efforts are appreciated...
This will not find my values until I remove the ^p and the $. Removing one or the other, still does not work. The number is NOT the end of the line, there's usually a " just after it, and then tons of other stuff. I am replacing URLs. Just to add, s=c&vl=vlg&vi=\d*" works to match the line with the quotes in Expresso, but not in Visual Studio.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Christian Graus wrote:
I was waiting on the other end of hte house for him to finish...
FTFY :laugh:
It’s always a pleasure to help when your efforts are appreciated...
JustWorking wrote:
Christian Graus wrote:
I was waiting on the other end of hte house for him to finish...
FTFY :laugh:
No you didn't!!
Silence is golden... but duct tape is silver!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
-
This will not find my values until I remove the ^p and the $. Removing one or the other, still does not work. The number is NOT the end of the line, there's usually a " just after it, and then tons of other stuff. I am replacing URLs. Just to add, s=c&vl=vlg&vi=\d*" works to match the line with the quotes in Expresso, but not in Visual Studio.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
What framework you are using?
It’s always a pleasure to help when your efforts are appreciated...
-
What framework you are using?
It’s always a pleasure to help when your efforts are appreciated...
Well, it shouldn't matter, I am doing this in the IDE, not in code. I am using search and replace within Visual Studio. It should work the same no matter what I use. I am editing HTML files.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
JustWorking wrote:
Christian Graus wrote:
I was waiting on the other end of hte house for him to finish...
FTFY :laugh:
No you didn't!!
Silence is golden... but duct tape is silver!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
_Damian S_ wrote:
JustWorking wrote:
Christian Graus wrote:
I was waiting on the other end of
hte house for him to finish...FTFY :laugh:
No you didn't!!
Yes I did :laugh: I cought Christian saying hte :laugh: Now we shell call him Mr. hte ;P
It’s always a pleasure to help when your efforts are appreciated...
-
Well, it shouldn't matter, I am doing this in the IDE, not in code. I am using search and replace within Visual Studio. It should work the same no matter what I use. I am editing HTML files.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Ok try this:
s=c&vl=vlg&vi=[0-9]*
It’s always a pleasure to help when your efforts are appreciated...
-
Ok try this:
s=c&vl=vlg&vi=[0-9]*
It’s always a pleasure to help when your efforts are appreciated...
Nope - it's obviously the same thing, and it does the same. Matches the numbers fine, but leaves them behind when I replace.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Nope - it's obviously the same thing, and it does the same. Matches the numbers fine, but leaves them behind when I replace.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
How are you replacing? post the code here
It’s always a pleasure to help when your efforts are appreciated...
-
If I were to use regex at all in the replacement string, I'd be doing a capture in the search and using the captured object in the replacement, which is one level of difficulty above what I was trying to do.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Sorry - I see I misread your requirement - I thought you DIDN'T want to replace the numbers!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
How are you replacing? post the code here
It’s always a pleasure to help when your efforts are appreciated...
There is no code. CTRL-Shift-H. Replace dialog in visual studio.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
There is no code. CTRL-Shift-H. Replace dialog in visual studio.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Christian Graus wrote:
CTRL-Shift-H. Replace dialog in visual studio.
:omg: you can't do that, its not dynamic it is static so you have to do it one by one
It’s always a pleasure to help when your efforts are appreciated...
-
_Damian S_ wrote:
JustWorking wrote:
Christian Graus wrote:
I was waiting on the other end of
hte house for him to finish...FTFY :laugh:
No you didn't!!
Yes I did :laugh: I cought Christian saying hte :laugh: Now we shell call him Mr. hte ;P
It’s always a pleasure to help when your efforts are appreciated...
JustWorking wrote:
cought
Just so you know... it's caught!!
Silence is golden... but duct tape is silver!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
-
Christian Graus wrote:
CTRL-Shift-H. Replace dialog in visual studio.
:omg: you can't do that, its not dynamic it is static so you have to do it one by one
It’s always a pleasure to help when your efforts are appreciated...
Wow - so the regex search and replace is useless then ? Great. Thanks for helping me. Do you have any link that explains why they didn't bother to make this useful at all ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Sorry - I see I misread your requirement - I thought you DIDN'T want to replace the numbers!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
No, I hoped I could use regex to replace a bunch of SIMILAR strings with the same value.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
I was replacing s=c&vl=vlg&vi=\d* with a blank string, just a space. It replaces s=c&vl=vlg&vi= and doesn't replace the digits on the end. The digits are 1-3 digits, as in s=c&vl=vlg&vi=1 s=c&vl=vlg&vi=2 s=c&vl=vlg&vi=10 s=c&vl=vlg&vi=11 s=c&vl=vlg&vi=33 s=c&vl=vlg&vi=101 etc. I'd end up with 1 2 10 11 33 101 and, of course, if I just search for that term, it finds all the matches in my file. Oh - is this a case where I need to use a greedy operator ? *doh* (Edit) I don't use regex that often, but it appears to me that my operator is fine, I don't see any alternative to use....(/Edit)
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
modified on Tuesday, June 28, 2011 12:14 AM
s=c&vl=vlg&vi=[0-9]+
Christian Graus wrote:
Oh - is this a case where I need to use a greedy operator ? *doh*
Searches should be greedy by default (maybe not in Visual Studio). In C#, ? will make it non-greedy.
Driven to the ARMs by x86.
-
Wow - so the regex search and replace is useless then ? Great. Thanks for helping me. Do you have any link that explains why they didn't bother to make this useful at all ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
It is called Find and Replace no search and replace :doh:
It’s always a pleasure to help when your efforts are appreciated...
-
Wow - so the regex search and replace is useless then ? Great. Thanks for helping me. Do you have any link that explains why they didn't bother to make this useful at all ?
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
I would love to see some green between mu posts :rolleyes:
It’s always a pleasure to help when your efforts are appreciated...
-
But isn't it counter intuitive that if I do a search and replace using regex, the regex portion of what I find, is not replaced ? Ooops - in Visual Studio.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
JGSoft - Regex Magic: works wonders. Don't leave home with out it.
try {
if (Regex.IsMatch(subjectString, "")) {
// Successful match
} else {
// Match attempt failed
}
} catch (ArgumentException ex) {
// Syntax error in the regular expression
}----------------------------- Just along for the ride. -----------------------------