Replace() Function And Wildcards
x = "1 800 123-4567"
? replace(x, [!0-9], "")
This obviously doesn't work as advertised. I'm not looking for a function that loops thru each character in a string. I've already got that. I'm looking for a one-liner where it's somehow possible to use wildcards in conjunction with the Replace() function, with a working example.
If you've got a working example, I'd sure love to see it, elsewise tell me why it's not possible.
I appreciate your help.
Best wishes - Bob
Thank you for taking the time to report an issue.
What's wrong... Please write below.
The two main failed attempts have been run an update query in which the field is updated to the following:
Neither one of which has replaced any hashes.
My requirement is if one filed contians more than 10 words to replace at once, how to repeat the sam function for that filed to give output in another filed.
Field1 Exp1: NewName
A, B,C,D,E,F Apple,Bat,Cat,Dog,Eat,Frog.
* Learn about using the Find and Replace dialog box
* Find and replace data in a table
* Find and replace data in a form
* Find data in a query result set
* Find wildcard characters
* Examples of wildcards in use
* Find quotation marks and null or blank values
* Find and Replace dialog box control reference
I'm currently working with Replace(Replace(Replace(.etc and as I am going to need to use this on multiple queries, I don't want to have to edit each one manuallyevery time I need to add a new 'illegal character'.
I have created a table (tblBannedChars) containing the following fields: BannedChar & ReplaceChar; the general idea being that I could use Replace([string],[BannedChar],[ReplaceChar])and the outcome would be that it had repeated the Replace function for each record in the tblBannedChars table.
705 First St #5 |
804 Main St #16 |
I just want to remove the pound (#) signs. How do find/replace for just the #?
I tried the Replace Function but it deletes the entire cell. I also tried the RemoveAlpha but I get an error saying its an undefined function.
1.) I think I am looking at replacing each column individually. For example, for a table with 4 columns, I am looking at.
Replace([Table]![Column1], etcetc), then
Replace([Table]![Column2], etcetc), then
Replace([Table]![Column3], etcetc), then
This is NOT a big deal to me (Problem 2 is the bigger problem!
2.) As everyone knows the Replace functions works as such so that:
Replace("alphabet", "bet", "hydro") would return "alphahydro". You are supposed to surround the 2nd function (find) and third function (replacement) with quotation marks.
However, I am trying to replace the quotation marks in the table! And in the 2nd function (find), I am surrounding the quotation mark symbol with quotation marks (so it looks like """) and it is not working!
Does anyone know of an easy way to do this? You'd think that wildcards would work but I can't figure it out
Replace(«string», «find», «replace»)
I can use a formula like this, where the replacement text is a table field. Replace([textin],"Find this text string",[cname])
What I want to do is get the text to find, and the variable NAME to use for replacement from a table like this:
txtfind | replacefieldname
Imagine a query that would replace a series of placeholders, set up as some text between brackets, with the data from a query or table that contains the three fields shown. It's like a mailmerge function.
I can't figure out the proper syntax that would refer to the txtfind and replacefieldname variables in the replace() function.
This is part of a larger project.
Also, there isn't an "x" in every array, so it would be cool if I didn't get an error message when it can't find an "x