Search Results

Search found 53464 results on 2139 pages for 'find and replace'.

Page 34/2139 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • eregi replace replacement

    - by apis17
    hi, since eregi replace was deprecated on version 5.3 i want to make my program compatible with new version of php http://php.net/manual/en/function.eregi-replace.php so, i'm trying to use preg_replace like this preg_replace(",",'','20,000.00'); but come with error i'm familiar with eregi_replace(',','','20,000.00'); i'm not familiar with regex expression. what is the best replacement for eregi_replace?

    Read the article

  • How do you replace content without losing focus?

    - by Ryan
    For example: <input type="text" name="test" onChange="document.formname.test.value=.document.formname.test.value.replace('something','something else')" /> The replace function works but it loses focus on every change How do you make it not lose focus? What I'm trying to do is make it so that certain text is immediately replaced with new text when its typed but you can continue typing

    Read the article

  • How to replace only part of the match with python re.sub

    - by Arty
    I need to match two cases by one reg expression and do replacement 'long.file.name.jpg' - 'long.file.name_suff.jpg' 'long.file.name_a.jpg' - 'long.file.name_suff.jpg' I'm trying to do the following re.sub('(\_a)?\.[^\.]*$' , '_suff.',"long.file.name.jpg") But this is cut the extension '.jpg' and I'm getting long.file.name_suff. instead of long.file.name_suff.jpg I understand that this is because of [^.]*$ part, but I can't exclude it, because I have to find last occurance of '_a' to replace or last '.' Is there a way to replace only part of the match?

    Read the article

  • Listview...how to conditionally replace a value with a string

    - by GaryAmundson
    Hi, my app presents a listview, from a database cursor and XML, that needs to replace the values in a column with various words based on the integer value contained in the cursor. For example, if the value is -1, replace it with the word "Invalid", but if the value is = 0 then just display the value. I was under the impression this could magically be done via XML... TIA.

    Read the article

  • Replace an Array with an Array

    - by Dane Man
    I have and NSMutableArray and I want to replace it with another, but if I try to do it like this... firstArray = secondArray; ...then it seems to erase the entire firstArray and I get this error message.. Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)' ...and the bounds should be (6) not (0). Is there a correct way to replace the array? PS: I already checked the secondArray and it functions fine.

    Read the article

  • How to Find and Replace the Enter character?

    - by karikari
    How to Find and Replace the 'Enter' characters in the text file? Here is my code: string searchString( "\r" ); // <------- how to look for ENTER chars? string replaceString( "XXXX" ); assert( searchString != replaceString ); string::size_type pos = 0, pos3 =0; while ( (pos = test.find(searchString, pos)) != string::npos ) { test.replace( pos, searchString.size(), replaceString ); pos++; }

    Read the article

  • replace all spaces and special symbols with dash in url use php language

    - by khushbu
    How to replace space and dash coming together with only dash in php e.g below is my url [url] = http://kjd.case.150/1 BHK+Balcony- 700+ sqft. spacious apartmetn Bandra West In this I want to replace all special characters with dash in php.In url there is already 1 dash after balcony.If i m replacing dash with special chars then it becomes two dash bcoz already there is 1 dash in url and i want only 1 dash.

    Read the article

  • sqlite, UPDATE OR REPLACE

    - by acidzombie24
    I do something like UPDATE OR REPLACE someTable SET a=1, b=2 WHERE c=3 I expect if it doesnt exist it will be inserted into the DBs. But nothing happens and i get no errors. How can i insert data, replace it if it already exist and use a where for the condition (instead of replacing BC of a unique ID)

    Read the article

  • Replace first Letter in a field Oracle

    - by Stanley
    Hi Guys I have this Table I need to replace the First Letter in ACCT_NAME with the First Name of ACCT_SHORT_NAME. Records like the Higliighted(RAFFMAN) should not be changed. I have tried: select acct_name, ACCT_SHORT_NAME,replace(acct_name, substr(acct_name, 1, 1), ACCT_SHORT_NAME) from tbaadm.gam where schm_type = 'TDA' and rcre_user_id = 'SYSTEM' and substr(acct_name,2,1) = ' ' I am getting: This means that am Picking the whole value in ACCT_SHORT_NAME. WHat is the best way to do what am trying to do?

    Read the article

  • Find multiple line spanning text and replace using Powershell

    - by MrGrant
    Hello, I am using a regular expression search to match up and replace some text. The text can span multiple lines (may or may not have line breaks). Currently I have this: $regex = "\<\?php eval.*?\>" Get-ChildItem -exclude *.bak | Where-Object {$_.Attributes -ne "Directory"} |ForEach-Object { $text = [string]::Join("`n", (Get-Content $_)) $text -replace $RegEx ,"REPLACED"}

    Read the article

  • Replace character between strings

    - by trembon
    Maybe it's just too late for me to do this, but I'm trying to replace a character between 2 string with regex in PHP. Example string: other | text [tag]text|more text|and more[/tag] end | text My goal is to replace | with <br/> between [tag] and [/tag]. Tried with this, seems it wasn't that easy though: /<td>(\|)<td>/gsi Searched a bit, but couldn't make out an answer with the stuff I found. Hope you can help, thanks

    Read the article

  • replace new lines with comas in shell

    - by mpapis
    I want to replace new lines in text with coma or space but do not change the last new line. I know of this question: How to replace new lines with tab characters - but it does produce an tab on end instead of new line. So far I have come with: awk 'NR>1{printf","} {printf $1} END{printf"\n"}' Is there an easier way to do this? This is not an assignment, I am just curious want to level up my scripting.

    Read the article

  • Replace all URL unless it is allowed

    - by ratamaster
    I had a regex that replaced all URLs from a given string: my_string = "www.example.com test www.mysite.com" my_string.gsub!(/[a-zA-Z0-9\-\.]+\.(com|net|de|org|uk|biz|info|co.uk|es|de)(\/\S*)?/i,'(site hidden)') As a result of the above I get: "(site hidden) test (site hidden)" How could I change the regex to not replace www.mysite.com ??? It means that the replace should output "(site hidden) test www.mysite.com" Thanks !

    Read the article

  • Hide/Replace Nginx Location Header?

    - by Steven Ou
    I am trying to pass a PCI compliance test, and I'm getting a single "high risk vulnerability". The problem is described as: Information on the machine which a web server is located is sometimes included in the header of a web page. Under certain circumstances that information may include local information from behind a firewall or proxy server such as the local IP address. It looks like Nginx is responding with: Service: https Received: HTTP/1.1 302 Found Cache-Control: no-cache Content-Type: text/html; charset=utf-8 Location: http://ip-10-194-73-254/ Server: nginx/1.0.4 + Phusion Passenger 3.0.7 (mod_rails/mod_rack) Status: 302 X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.7 X-Runtime: 0 Content-Length: 90 Connection: Close <html><body>You are being <a href="http://ip-10-194-73-254/">redirect ed</a>.</body></html> I'm no expert, so please correct me if I'm wrong: but from what I gathered, I think the problem is that the Location header is returning http://ip-10-194-73-254/, which is a private address, when it should be returning our domain name (which is ravn.com). So, I'm guessing I need to either hide or replace the Location header somehow? I'm a programmer and not a server admin so I have no idea what to do... Any help would be greatly appreciated! Also, might I add that we're running more than 1 server, so the configuration would need to be transferable to any server with any private address.

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >