Search Results

Search found 2 results on 1 pages for 'freshwower'.

Page 1/1 | 1 

  • perl regex escape characters

    - by freshWoWer
    I have heard perl is a good language at doing regex but i am a bit confused at the characters that requires escaping I tested the code on http://regexlib.com/RETester.aspx and got the result I want //home/dev/abc/code/hello/world.cpp#1 //home/dev/((.*?)/[^/]+).*# Match $1 $2 //home/dev/abc/code/hello/world.cpp# abc/code abc However, I am not quite sure how do i translate this to perl code I tried, \/\/home\/dev\/\(\(\.\*\?\)\/\[\^\/\]\+\)\.\*\# and \/\/home\/dev\/((.*?)\/[^\/]+).*\# and both failed Don't you think the escaping makes the regex very unreadable? Am i using something wrong?

    Read the article

  • using alias parameters in window command prompt

    - by freshWoWer
    Source:http://jpsoft.com/help/index.htm?alias.htm Aliases can use command line parameters or parameters like those in batch files. The command line parameters are numbered from %0 to %511. (%0 contains the alias name.) For example, the following alias will change directories, perform a command, and return to the original directory: alias in pushd %1 & %2$ & popd when i run the above, my command prompt gives error saying %1 * Unable to read value of alias * '%2' is not recognized as an internal or external command, operable program or batch file. 'popd`' is not recognized as an internal or external command, operable program or batch file. if you use double quote instead, alias in "pushd %1 & dir & popd" it doesn't interprets the %1 when you execute the alias C:\abc\defalias Dumping all defined aliases for CMD.EXE. in =pushd %1 & dir & popd alias def wont work ---------EDIT------------ let me try some sample output with a simple echo alias D:\abc\defalias /? Usage: ALIAS [-v] [-p programName] [-f filespec] [ ] [-v] means verbose output. [-d] means delete aliases. [-p programName] specifies which image file name these alias definitions are for. Default is CMD.EXE [-f filespec] specifies a file which contains the alises. C:\Office\dev15alias out 'echo %1' %1' * Unable to read value of alias * C:\Office\dev15alias out backtick echo %1 backtick %1` * Unable to read value of alias * C:\Office\dev15alias out "echo %1" C:\Office\dev15alias Dumping all defined aliases for CMD.EXE. out =echo %1 C:\Office\dev15out abc %1 C:\Office\dev15alias out echo %1 %1 * Unable to read value of alias * C:\Office\dev15out abc ECHO is on. Problem is, both single quote and back tick produces error, while double quote wont treat %1 as variable parameter

    Read the article

1