Sponsored Content
Full Discussion: Python re.search vs re.sub
Top Forums Programming Python re.search vs re.sub Post 302965631 by metallica1973 on Monday 1st of February 2016 11:11:08 AM
Old 02-01-2016
Simply Awesome. Many thanks
 

8 More Discussions You Might Find Interesting

1. SuSE

"ssh suse-server 'python -V' > python-version.out" not redirecting

Okay, so I have had this problem on openSUSE, and Debian systems now and I am hoping for a little help. I think it has something to do with Python but I couldn't find a proper Python area here. I am trying to redirect the output of "ssh suse-server 'python -V'" to a file. It seems that no matter... (3 Replies)
Discussion started by: Druonysus
3 Replies

2. Programming

Search for a File Python

I am back at it with Python and have run into a little stupid hurdle. My goal is to simply search for the GeoIP.dat database and add the path to a couple of variables. So for example: geopath=os.system('find /usr/share -iname GeoIP.dat') geobase = pygeoip.GeoIP(geopath, pygeoip.MEMORY_CACHE)... (3 Replies)
Discussion started by: metallica1973
3 Replies

3. Shell Programming and Scripting

[Python] Search a file with paramiko

I need to compare the output files in a directory for sftp, looking through a mask. Return the full file name. Eg. I have a file named locally: test.txt I must check through sftp, if a file with the following name: test_F060514_H173148.TXT My idea is for the filename to a... (0 Replies)
Discussion started by: Jomeaide
0 Replies

4. Shell Programming and Scripting

**python** unable to read the background color in python

I am working on requirement on spreadsheet in python scripting. I have a spreadsheet containing cell values and with background color. I am able to read the value value but unable to get the background color of that particular cell. Actually my requirement is to read the cell value along... (1 Reply)
Discussion started by: giridhar276
1 Replies

5. Shell Programming and Scripting

Search and Replace+append a text in python

Hello all, I have a verilog file as following (part of it): old.v: bw_r_rf16x32 AUTO_TEMPLATE ( 1957 // .rst_tri_en (mem_write_disable), 1958 .rclk (clk), 1959 .bit_wen (dva_bit_wr_en_e), 1960 .din ... (5 Replies)
Discussion started by: Zam_1234
5 Replies

6. Windows & DOS: Issues & Discussions

How to execute python script on remote with python way..?

Hi all, I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine.. Below is the code I am trying: #!/usr/bin/env python import wmi c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies

7. Programming

Search or find a element inside list python

I have a list as follows: From this i need to grep the element using keyword as "primary" and return output as 12:13-internet-wifi-primary i used as follows if (i <= (len(system_info))): ss = system_info print... (5 Replies)
Discussion started by: Priya Amaresh
5 Replies

8. Programming

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

Hi all... As you know I like making code backwards compatible for as many platforms as possible. This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies
REDET(1)							   User Commands							  REDET(1)

NAME
redet - regular expression development and execution tool SYNOPSIS
redet <options> [<input file>] DESCRIPTION
redet allows the user to construct regular expressions and test them against input data by executing any of a variety of search programs, editors, and programming languages that make use of regular expressions. When a suitable regular expression has been constructed it may be saved to a file. Redet currently supports over fifty different programs and regular expression libraries. These include multiple versions of grep, several editors (Ed, Emacs, Sed, Vim), all the popular scripting languages (Awk, Perl, Python, Ruby, Tcl) and some less popular ones (Lua, Pike, Rebol), most shells (Bash, Ksh, Tcsh, Zsh) and various other languages, including Guile, Icon and Java. For each program, a palette showing the available regular expression syntax is provided. Selections from the palette may be copied to the regular expression window with a mouse click. Users may add their own definitions to the palette via their initialization file. Redet also keeps a list of the regular expressions executed, from which entries may be copied back into the regular expression under construction. The history list is saved to a file and restored on startup, so it persists across sessions. Redet provides both regular expression matching and substitution so long as the underlying program does. Although Redet is primarily an interface for other programs, it adds some features of its own. It is possible to define named character classes within Redet and to intersect them. This allows provides a means of searching on feature matrices. So long as the underlying program supports Unicode, redet allows UTF-8 Unicode in both test data and regular expressions. Several tools provide additional support for Unicode use. These include popup lists of Unicode ranges and general character properties, a widget for entering characters by their numerical code, and widgets for entering International Phonetic Alphabet characters, widgets for entering let- ters with a variety of accents and other diacritics. Although internal operations are entirely in Unicode, test data, comparison data, and results may be read and written in any encoding supported by Tcl/Tk. Redet is fully internationalized. If a suitable message catalogue is provided, the interface may be made available in any language and writing system supported by Unicode for which the necessary fonts are available. For usage information, execute redet with the command line flag -h. Full information about redet is available from the reference manual, which consists of a set of web pages. The master copy is located at: http://www.cis.upenn.edu/~wjposer/RedetManual/Manual.html. The entry Illustrated Web Manual on the Help menu will take you to the master manual page. The manual pages are packaged with every copy of Redet. OPTIONS
-c <file name> read character class definitions from the named file -d set the debug flag. This causes additional information to be printed during program execution. It is mostly useful for developers. -F <filename> read a feature list from <filename> -f act as a filter. This means that input is read from the standard input and output written to the standard output. -H do not read the history file -h print this help information -I <file> read <file> as the initialization file -i do not read the initialization file -n do not execute feature tests on startup -P list the programs supported and indicate which are available -p <program> use the named program -s start up in substitution mode -t show the results of feature tests -v print the program name and version, then exit SEE ALSO
awk (1), ed (1),grep (1), perl (1), sed (1) AUTHOR
Bill Poser (billposer@alum.mit.edu) LICENSE
GNU General Public License (http://www.gnu.org/licenses/gpl.txt), version 2. redet May 2007 REDET(1)
All times are GMT -4. The time now is 04:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy