Search/Replace for/with php variable name

Hi all.
I have just updated from Dreamweaver 5 to 5.5 and now I am missing a very handy functionality.
What I want to do is to replace all occurences of $a with $b.
In Dreamweaver 5 that was very easy by using "Find and replace":
Find in: All open documents
Search: Sourcecode
Find: $a
Replace: $b
Active options: Match case and Match whole word !!!!
Now in Dreamweaver 5.5 the option "Match whole word" is automatically disabled as soon as I enter a $ (dollar) in the search field.
I assume this has something to do with regular expressions but I do NOT check the option "Regular expression" in the search and replace dialog.
Is this a bug?
What are my options now.
If I don't have the possibility to to tick "Match whole word" my search does also replace all occurrences of $abc and $answer etc. with $b.
Thank you for your help

samet2011 wrote:
I have Dreamweaver 5 and 5.5 running parallel on my computer.
I can confirm that the way I described and used to use is working on Dreamweaver 5.
I was the person who informed Murray that Dreamweaver CS5 and CS5.5 both behave the same way. I have just checked as far back as CS3, and it also disables "Match whole word" when you enter a dollar sign in the Find field of the Find and Replace dialog box. In fact, that option is disabled whenever you enter any nonalphanumeric character (except an underscore) in that field. It's not limited to dollar signs.
Why it's not disabled in your version of CS5 is a mystery.
However, to solve your problem, you don't need either a regex or "Match whole word". Simply type the name of your PHP variable followed by a space into the Find field. Also add a space after the name of the variable you're using as the replacement.
What "Match whole word" does under the hood is to use a regular expression to find a word break. As long as you leave a space between your variables and any following code, simply adding the space to your search will do the trick.
However, if you have cases where a variable is followed by a comma, closing parenthesis, or some other character, you will need to use the following regex:
Find: \$variable_name\b
Replace: $new_name
The \$ looks for a dollar sign. The variable_name matches the literal text of the variable name (replace it with the actual text you're looking for). The \b matches a word break in exactly the same way as "Match whole word".
In the Replace field, $new_name is the literal name of the new variable.

Similar Messages

  • Replacement path with text variable

    Hi experts,
    My client requirement is " when he enters the current year or current day then it should display the Description of that particular year r month r day."
    Can anyone explain me in detail how to create replacement path with text variable on FISCAL YEAR?
    Hope will solve my issue soon.
    Thanks in advance
    Jani Sk.

    Hi,
       goto the properties of your KF and click on the variable button side to that of the description field and click on new/Create option.Enter the technical name description for the text variable and select Replacement path as the Processing type and in the nxt screen select Fiscal year as the replacement variable and in nxt screen  specify as Key and provide offset values if necessary and click on finish.now select the variable by clickin on the variable button next to the description field.it comes after the description of the KF.Now run the query.
    Thanks,
    Sandeep

  • How to auto create a global variable with specific variable name in a global vi ?

    how to auto create a global variable with specific variable name in a global vi using lv ? Because i need to add a lot of global variable in this global vi. But you know, if  i manually add them , it will be a much time-costing work. So i want to use someway to auto generate ? Can i ?? Thanks a lot !

    Hi
    what aartjan is saying is the way for you. but you can develop an utility which will actually help you create global variables. To get the details on this just have a look at VI Scripting section on LAVA forum.
    But i would like you to suggest few things
    1. If your programs have so many global variables (Thats why u want utility) then you should take out some time to read about LabVIEW design patterns. I think if programmer follows these practicess he dont need a single global variable.
    2. Their are some other ways to achieve similar functionality as of global variables (Uninitialized Shift Registers, Single Element Qs and so on) but they are much faster than global variables.
    I am Attaching Whatever Resources i am having I will also attach the template of the design pattern i generaly use in short duration
    Message Edited by Tushar Jambhekar on 10-06-2005 07:33 PM
    Message Edited by Tushar Jambhekar on 10-06-2005 07:36 PM
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog
    Attachments:
    LabVIEWDesignPatterns.zip ‏1505 KB
    Large_Code_Implementation.zip ‏522 KB
    Database Tests.zip ‏868 KB

  • Problem in displaying dates for replacement path with text variable

    Hi all,
    I have to display dates in sequence as descriptions for 15 columns based on the the date entered by the user in Bex Report.I managed to display date as description using text variable with replacement path for single column.I could not able to increment date for other descriptions.Could you please help me to solve this issue.Its urgent.
    Ex: User enters 03/09/2007 then in the out put desciptions for the columns should be  03/09   04/09  05/09 ............ 17/09.
    Thanks in advance.
    Regards,
    Mandadi.

    Hi,
       goto the properties of your KF and click on the variable button side to that of the description field and click on new/Create option.Enter the technical name description for the text variable and select Replacement path as the Processing type and in the nxt screen select Fiscal year as the replacement variable and in nxt screen  specify as Key and provide offset values if necessary and click on finish.now select the variable by clickin on the variable button next to the description field.it comes after the description of the KF.Now run the query.
    Thanks,
    Sandeep

  • Variable replacement path with another variable

    Hi Guru's
    I'd like to use the functionnality of replacement path from a variable.
    Well, i have variable V_1 which is a basic manual entry variable based on a date infoobject. this variable is not mandatory and accessible.
    And i have the variable V_2 which should be based on V_1 so i created V_2 with a process replacement path and in the replacement tab i put V_1 (i try with the list but i didn't find my V_1)
    But the result is that V_2 is always empty but i have no problem when i check the query
    So do you have any idea ?
    Why i can not see the V_1 in the list of variable from the replacement ?
    I don't want to use by exit. i know that it is possible but i want to use the main simple functionnality for flexibility is maintenance by users.
    Thanks for help
    Cyril

    thanks for your answer,
    svu123, my V_1 variable is of course in a correct status to be used. i made test in first without V_2.
    And when i create V_2 in the first tab i activated correctly the replacement in processing type. if not i can not choose
    the query or variable source and i can not see the list of variables.
    Rakesh, i tried what you answered without results. i check different variables that are available in the list and i have
    lots of different variables (all in ready for input) but i have interval, multiple single values, SAP standard variables my own variable on other fields.
    any other ideas ?
    many thanks
    Cyril

  • Search constraint for field of type name

    Hi,
    I am using MDM 5.5 sp 06 patch 2. I am using webdynpro with MDM java API.
    I have a field of type Name. What should i use as the search constraint for the field of type name like we use textSearchConstraint for the field of type text.
    Thanks.

    Hi,
       Is that a built-in type? If not and if it's based on the built-in type text then you can use "TextSearchConstraint". Otherwise try with "NullSearchConstraint".
    Regards,
    Satyajit

  • Is there a replacement for 10g $ESBREQUEST variable in Mediator 11g?

    In SOA ESB 10g, I have used $ESBREQUEST variable for data enrichment. I have used it the following way:
    <xsl:param name="ESBREQUEST"/>
      <xsl:template match="/">
      <top:AffDataSyncWipCollection>
      <top:AffDataSyncWip>
      <top:recordId>
      <xsl:value-of select="concat($ESBREQUEST/s3:AccountField,$ESBREQUEST/s3:Code)"/>
      </top:recordId>
      <top:acctField>
      <xsl:value-of select="$ESBREQUEST/s3:AccountField"/>
      </top:acctField>
    However, we are migrating to SOA Mediator 11g now, and for the same code, I get the following error:
    ORAMED-01201:[Error in transform operation]Error occurred while transforming payload using "xsl/AcctCodeSegmentExistsResponse_To_AffDataSyncWipCollection.xsl" for target part "AffDataSyncWipCollection".Possible Fix:Review the XSL or source payload. Either the XSL defined does not match with the payload or payload is invalid. Cause:XML-22036: (Error) Cannot convert result tree fragment to NodeSet.
    Would anyone be able to help me how to fix this issue in Mediator 11g?
    I have read that data can be accessed using $initial.request variable. Could anyone provide detailed steps please?
    Thanks much and any white paper or suggestion will be greatly appreciated.

    May be you are looking on polling ability of DB Adapter which is definitely an option but I always suggest to use Oracle GoldenGate for such use cases.
    Regards,
    Anuj

  • Search parameter type with bind variable

    For Search type parameter in Oracle BI Publisher, if the List of values (SQL Query) contains bind variable, then application keep on searching. Any suggestions ?.
    Thanks in advance.
    Edited by: 966132 on 17-Oct-2012 22:23

    I don't think the search-type parameter works properly. It doesn't seem to function in our OBIEE 11g (11.1.1.5 + BP3). When you use a query that retrieves both the descriptive string and the numeric ID, the search box does correctly show the descriptive string. However, after selecting one of the choices, the actual data query returns nothing.
    Furthermore, the extra steps required to search take longer than scrolling through a very long list of values, the normal way. Good idea, bad implementation, no surprise.

  • Searching Ipad for photos by file name

    Why can't I find photos in my Ipad search? (I have an Ipad 2.) When I search for something, it will find everything BUT photos. As it is, it takes forever to find whatever specific photo I want to look at, because I have to scroll and scroll and scroll for it, instead of just search for it by name. Seems like a bad design flaw for a device that can easily accumilate thousands upon thousands of photos, especially since this is a tool that can be used to show other people photos that are better/bigger than a phone, and faster/more portable/easier to access than a computer...Am I just missing something?

    Leave feedback for Apple here
    http://www.apple.com/feedback/ipad.html

  • How to create a PDF with a variable name

    I am a new user and i need a suggestion.
    I need to create a PDF file with a name that is a variable.
    I extract some data from SAP and i want use the "Offer number" to call my file.
    Wher i have to past my "variable" to the OutputFileName?
    Thanks
    Jeix

    This isn't an Output Designer question but an Output Server question. Anyway, see the subject titled "Dynamic pdf filename creation from form data content", currently about 13 subjects before yours.
    http://www.adobeforums.com/webx/.59b585c2/0

  • Can't create float array with a variable name as size parameter?

    Hi,
    When trying to compile code that users a variable in the array subscript to set the size, CC gives the following error:
    Error: An integer constant expression is required within the array subscript operator.
    1 Error(s) detected.The code is as follows:
    int main()
    //blah blah
    const int arrSize = numberVariables;
        float tempArr[arrSize];
    //blah blah
    }Output from CC -V:
    unknown% CC -V
    CC: Sun C++ 5.9 SunOS_i386 Patch 124864-01 2007/07/25Output from uname -a:
    unknown% uname -a
    SunOS unknown 5.10 Generic_137138-09 i86pc i386 i86pcAny ideas on why CC is giving that error?
    ~Slow
    Edited by: SlowToady on Nov 15, 2008 8:28 PM
    Edited by: SlowToady on Nov 15, 2008 8:36 PM

    Marc_Glisse wrote:
    Last time I checked, I did not see VLAs in the draft of the next C++ standard, which I believe is now feature complete. So either I missed it (quite possible) or VLAs were considered a bad idea (for C as well many people consider alloca and VLA bad ideas). It is however a very reasonable extension to have (care to file a RFE?).The following code performs like this on an IBM x366 with 4 single-core 3.16 GHz Xeons, running OpenSolaris build 96:
    -bash-3.2$ ./thrtest
    malloc() took 440895924 ns
    alloca() took 2122522 ns
    -bash-3.2$Using alloca is two hundred times faster.
    Two hundred times faster.
    Think about that next time some pedant says alloca "sucks".
    Try for yourself. Here's the code:
    #include <stdlib.h>
    #include <pthread.h>
    #include <alloca.h>
    #include <strings.h>
    #include <stdio.h>
    #define NUM_THREADS 8
    #define ITERS 10000
    #define BYTES 1024
    typedef void ( *mem_func_t )( void );
    void alloca_iter()
        char *ptr;
        ptr = ( char * ) alloca( BYTES );
        memset( ptr, 0, BYTES );
        return;
    void malloc_iter()
        char *ptr;
        ptr = ( char * ) malloc( BYTES );
        memset( ptr, 0, BYTES );
        free( ptr );
        return;
    void *thread_proc( void *arg )
        mem_func_t mem_iter;
        mem_iter = ( mem_func_t ) arg;
        for ( int ii = 0; ii < ITERS; ii++ )
            mem_iter();
        return( NULL );
    int main( int argc, char **argv )
        pthread_t tids[ NUM_THREADS ];
        void *results[ NUM_THREADS ];
        hrtime_t start;
        hrtime_t end;
        int ii;
        start = gethrtime();
        for ( ii = 0; ii < NUM_THREADS; ii++ )
            pthread_create( &tids[ ii ], NULL, thread_proc, malloc_iter );
        for ( ii = 0; ii < NUM_THREADS; ii++ )
            pthread_join( tids[ ii ], &results[ ii ] );
        end = gethrtime();
        printf( "malloc() took %ld ns\n", end - start );
        start = gethrtime();
        for ( ii = 0; ii < NUM_THREADS; ii++ )
            pthread_create( &tids[ ii ], NULL, thread_proc, alloca_iter );
        for ( ii = 0; ii < NUM_THREADS; ii++ )
            pthread_join( tids[ ii ], &results[ ii ] );
        end = gethrtime();
        printf( "alloca() took %ld ns\n", end - start );
        return( 0 );
    }

  • Subscript execution with a variable name

    Is the a way to run a subscript where the name is a dynamic variable? for example:
    SubtoRun = T1 (T1 is a diadem text variable which is the name of the sub to be run)
    Call SubtoRun

    Hello Bill
    You can use the Execute command, e.g.
    sub test
    msgbox "hallo"
    end sub
    t1="test"
    execute t1
    Hope this helps!
    Winfried

  • C:set with dynamic variable name

    Hello,
    we have a litte market system.
    we iterate over the articles to display them on a page
    foreach article type we have to include a popup, but only once foreach article type.
    So if we have more than one article of the same type, the popup should be included only one time.
    <c:forEach var="article" items="#{MyArticleController.entities}">
        <c:if test="${requestScope[article.dtype] != true}">
            <!-- <ui:include src="/market/details/#{article.dtype}.xhtml"/>  -->          
            <c:set scope="request" var="${article.dtype}" value="1" />
        </c:if>
        <!-- <ui:include src="/market/preview/#{article.dtype}.xhtml"/>-->
    </c:forEach>I think the line with the c:set seems to be the problem.
    How can I solve this problem. How can I set a dynamic value and test against it later?
    Thanks
    Dirk

    You were close with your first example.
    However as noted, the <c:set> tag doesn't accept a dynamic expression for the "var" attribute.
    Suggested alternative: instead of using request attributes, have a seperate map
    <jsp:useBean id="articleTypeUsed" class="java.util.HashMap"/>
    <c:forEach var="article" items="#{MyArticleController.entities}">
        <c:if test="${not empty articleTypeUsed[article.dtype]}">
            <!-- <ui:include src="/market/details/#{article.dtype}.xhtml"/>  -->          
            <c:set target="${articleTypeUsed}" property="${article.dtype}" value="1" />
        </c:if>
        <!-- <ui:include src="/market/preview/#{article.dtype}.xhtml"/>-->
    </c:forEach>That should solve your issue with translating this java code into jstl.
    Whether the mix of JSTL and JSF/ui will work well together is a completely seperate issue, and one I can't really help with.

  • SQL query with PHP variable help

    Hi,
    Using Dreamweaver Developer Toolbox, I added a Horizontal
    recordset to get two columns across for the city. Next to this is a
    number value of how many records are in the particular city.
    But I have gone wrong somewhere, as I get the same value for
    all my 102 cities.
    I have two records in the 'jobs' table and it shows '2' in
    the repeat region for all 102 cities.
    Can anyone point me in the right direction?
    Thank you.

    Many thanks for your reply.
    I have run the statistic already for the both tableA and tableB as well all the indexes associated with both table (using dbms_stats, I am on 9i db ) but not the indexed columns.
    for table I use:-
    begin
    dbms_stats.gather_table_stats(ownname=> 'IVAN', tabname=> 'TABLEA', partname=> NULL);
    end;
    for index I use:-
    begin
    dbms_stats.gather_index_stats(ownname=> 'IVAN', indname=> 'TABLEB_IDX_003', partname=> NULL);
    end;
    Is it possible to show me a sample of how to collect statisc for INDEX columns stats?
    regards
    Ivan

  • Can I replace string with a variable in innerhtml?

    Hi,
    I have the following script:
    function change2(e)
    var userInput = document.getElementById(e).innerHTML;
    userInput++;
    document.getElementById(e).innerHTML = userInput;
    </script>
    being called via:
    echo "<a href=\"#\"><img src=\"./../Up.JPG\" border=\"0\" onclick=\"change2('".$idkey."');\"></a>";
    echo " ".$num_rows1."</form>";
    I basically want 'e' to be dynamic accepting the id passed into it.
    Thanks in advance.

    sorry, had a typo. resolved.

Maybe you are looking for