Sponsored Content
Full Discussion: Extracting substring
Top Forums Shell Programming and Scripting Extracting substring Post 302524032 by mira on Friday 20th of May 2011 06:52:43 PM
Old 05-20-2011
Hi Franklin,

I am curious to know what does this '##*' mean in this regular expression?

Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting substring from a file name

hi i need to name a file with a substring of a another file name. i.e. if the old filename is abc.txt , the new filename should be abc_1.txt i should get the substring of the file name and then name the new one please let me know how to do it (4 Replies)
Discussion started by: adityamahi
4 Replies

2. UNIX for Dummies Questions & Answers

Extracting substring using ${var:start:len}

Hi All, I am trying to extract substring from a variable by using the pattern as var3=${var2:3:3} var2 is a variable already declared and having the value. From var2 i need to extract 3 characters from 3rd position. When ever i give the expression var3=${var2:3:3} on shell prompt, the... (3 Replies)
Discussion started by: Raamc
3 Replies

3. Shell Programming and Scripting

Extracting substring from string

Hi awk and sed gurus, Please help me in the following. I have the following entries in the file ABCDErules AbHDPrules ABCrules -- -- and other entries in the file. Now, I want to extract from the file that contain entries for *rules and process it separately. How can i do it... (6 Replies)
Discussion started by: sdosanjh
6 Replies

4. Shell Programming and Scripting

Extracting a substring from a string in unix

Hi, I would like to extract a substring from a string in unix. eg: ./checkfile.sh -- i need only checkfile.sh from this string. Could someone help me out in this... Regards Arun (19 Replies)
Discussion started by: arunkumarmc
19 Replies

5. UNIX for Dummies Questions & Answers

Extracting substring between pattern only one time

Hello ifconfig return : eth0 Link encap:Ethernet HWaddr 11:24:1D:C1:99:BA inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37307 errors:0 dropped:0 overruns:0 frame:0 ... (2 Replies)
Discussion started by: jcdole
2 Replies

6. Shell Programming and Scripting

Need help in extracting the substring in UNIX

Hi all, I need to extract the "abcdef" from the below string Digital_abcdef_20130103.txt.gz The length of the "abcdef" will be changing but it will be always after the word Digital_ and before the second underscore help in this regard is highly appreciated (3 Replies)
Discussion started by: rithushri
3 Replies

7. Shell Programming and Scripting

Help on extracting a substring from the input string

Hi, I am new to Unix. I am trying to extract a substring from an input string: Ex - input string: deploy_v11_9_1 i want to extract and store the value v11_9_1 from the input string in a new variable. I am using following command in my shell script file: echo "Enter the folder name u... (5 Replies)
Discussion started by: Pranav Bhasker
5 Replies

8. Shell Programming and Scripting

Bash - Extracting whole word containing substring

hello. I get this text when using some command : S | Name | Type | Version | Arch | Repository --+-----------------+---------+---------+------+------------- | AdobeReader_enu | package | 9.5.4-1 | i486 | zypper_local I need to get "AdobeReader_enu" from the the pattern "Ado"... (7 Replies)
Discussion started by: jcdole
7 Replies

9. Shell Programming and Scripting

Extracting a substring from Line

Hi All I have a line which is as below 1234567 Gagan Paswani zz23432 1000000000 1000000000 ASTHEYXX-RTUC zz23432 I need to extract the first occurence of zz23432 which will have the reg expression as {2}{5} Could you please assist as to how I can extract this... (3 Replies)
Discussion started by: Prashantckc
3 Replies

10. Shell Programming and Scripting

Extracting substring from variable

Hi All, I'm facing issue wherein I have 2 character string like 'CR' and 'DR' and I want to extract just 1st character but am unable to do it. I tried below options but they are returning me 2nd character only, var="CR" echo ${var:1} returns just "R" echo ${var:0} returns "CR" ... (5 Replies)
Discussion started by: arvindshukla81
5 Replies
CheckDigits(3pm)					User Contributed Perl Documentation					  CheckDigits(3pm)

NAME
Algorithm::CheckDigits - Perl extension to generate and test check digits SYNOPSIS
perl -MAlgorithm::CheckDigits -e Algorithm::CheckDigits::print_methods or use Algorithm::CheckDigits; @ml = Algorithm::CheckDigits->method_list(); $isbn = CheckDigits('ISBN'); if ($isbn->is_valid('3-930673-48-7')) { # do something } $cn = $isbn->complete('3-930673-48'); # $cn = '3-930673-48-7' $cd = $isbn->checkdigit('3-930673-48-7'); # $cd = '7' $bn = $isbn->basenumber('3-930673-48-7'); # $bn = '3-930673-48' ABSTRACT
This module provides a number of methods to test and generate check digits. For more information have a look at the web site www.pruefziffernberechnung.de (german). SUBROUTINES
/METHODS CheckDigits($method) Returns an object of an appropriate Algorithm::CheckDigits class for the given algorithm. Dies with an error message if called with an unknown algorithm. See below for the available algorithms. Every object understands the following methods: is_valid($number) Returns true or false if $number contains/contains no valid check digit. complete($number) Returns a string representation of $number completed with the appropriate check digit. checkdigit($number) Extracts the check digit from $number if $number contains a valid check digit. basenumber($number) Extracts the basenumber from $number if $number contains a valid check digit. Algorithm::CheckDigits::method_list() Returns a list of known methods for check digit computation. Algorithm::CheckDigits::print_methods() Returns a list of known methods for check digit computation. You may use the following to find out which methods your version of Algorithm::CheckDigits provides and where to look for further information. perl -MAlgorithm::CheckDigits -e Algorithm::CheckDigits::print_methods CHECK SUM METHODS At the moment these methods to compute check digits are provided: (vatrn - VAT Return Number, in german ustid UmsatzSTeuer-ID) m07-001 See Algorithm::CheckDigits::M07_001. euronote, m09-001 European bank notes, see Algorithm::CheckDigits::M09_001. amex, bahncard, diners, discover, enroute, eurocard, happydigits, isin, jcb, klubkarstadt, mastercard, miles&more, visa, m09-001, imei, imeisv See Algorithm::CheckDigits::M10_001. siren, siret, m10-002 See Algorithm::CheckDigits::M10_002. ismn, m10-003 See Algorithm::CheckDigits::M10_003. ean, iln, isbn13, nve, 2aus5, m10-004 See Algorithm::CheckDigits::M10_004. identcode_dp, leitcode_dp, m10-005 See Algorithm::CheckDigits::M10_005. rentenversicherung, m10-006 See Algorithm::CheckDigits::M10_006. sedol, m10-008 See Algorithm::CheckDigits::M10_008. betriebsnummer, m10-009 See Algorithm::CheckDigits::M10_009. postscheckkonti, m10-010 See Algorithm::CheckDigits::M10_010. ups, m10-011 See Algorithm::CheckDigits::M10_011. hkid, isbn, issn, nhs_gb, ustid_pt, vat_sl, wagonnr_br, m11-001 See Algorithm::CheckDigits::M11_001. pzn, m11-002 See Algorithm::CheckDigits::M11_002. pkz, m11-003 See Algorithm::CheckDigits::M11_003. cpf, titulo_eleitor, m11-004 See Algorithm::CheckDigits::M11_004. ccc_es, m11-006 See Algorithm::CheckDigits::M11_006. ustid_fi, vatrn_fi, m11-007 See Algorithm::CheckDigits::M11_007. ustid_dk, vatrn_dk, m11-008 See Algorithm::CheckDigits::M11_008. nric_sg, m11-009 See Algorithm::CheckDigits::M11_009. ahv_ch, m11-010 See Algorithm::CheckDigits::M11_010. ustid_nl, vatrn_nl, m11-011 See Algorithm::CheckDigits::M11_011. bwpk_de, m11-012 See Algorithm::CheckDigits::M11_012. ustid_gr, vatrn_gr, m11-013 See Algorithm::CheckDigits::M11_013. esr5_ch, m11-015 See Algorithm::CheckDigits::M11_015. ustid_pl, vatrn_pl, m11-016 See Algorithm::CheckDigits::M11_016. ecno, ec-no, einecs, elincs, m11-017 See Algorithm::CheckDigits::M11_017. isan, m16-001 See Algorithm::CheckDigits::M16_001. dni_es, m23-001 See Algorithm::CheckDigits::M23_001. ustid_ie, vatrn_ie, m23-002 See Algorithm::CheckDigits::M23_002. code_39, m43-001 See Algorithm::CheckDigits::M43_001. ustid_lu, vatrn_lu, m89-001 See Algorithm::CheckDigits::M89_001. ustid_be, vatrn_be, m97-001 See Algorithm::CheckDigits::M97_001. iban, m97-002 See Algorithm::CheckDigits::M97_002. upc, mbase-001 See Algorithm::CheckDigits::MBase_001. blutbeutel, bzue_de, ustid_de, vatrn_de, mbase-002 See Algorithm::CheckDigits::MBase_002. sici, mbase-003 See Algorithm::CheckDigits::MBase_003. pa_de, mxx-001 See Algorithm::CheckDigits::MXX_001. cas, mxx-002 See Algorithm::CheckDigits::MXX_002. dem, mxx-003 Old german bank notes (DEM), see Algorithm::CheckDigits::MXX_003. ustid_at, vatrn_at, mxx-004 See Algorithm::CheckDigits::MXX_004. esr9_ch, mxx-005 See Algorithm::CheckDigits::MXX_005. verhoeff, mxx-006 Verhoeff scheme, see Algorithm::CheckDigits::MXX_006 or Algorithm::Verhoeff EXPORT None by default. SEE ALSO
perl, www.pruefziffernberechnung.de. AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de> THANKS
Petri Oksanen made me aware that CheckDigits('IMEI') would invoke no test at all since there was no entry for this in the methods hash. COPYRIGHT AND LICENSE
Copyright 2004-2006 by Mathias Weidner This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2008-06-06 CheckDigits(3pm)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy