Sponsored Content
Full Discussion: Regex quantifier question
Top Forums UNIX for Dummies Questions & Answers Regex quantifier question Post 302541354 by yazu on Sunday 24th of July 2011 05:02:09 AM
Old 07-24-2011
Sed uses BRE - basic regular expressions:
Code:
sed -n '/[aeiou]\{2,\}/p'

With egrep and gnu sed you can use ERE - extended RE:
Code:
egrep '[aeiou]{2,}'
sed -rn '/[aeiou]{2,}/p'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

regex question

hi, i got a problem with understanding regular expressions. what i wanna do is scanning the wtmp logfile for ips and if a specific ip is echoed id like to be a part of a text to be assigned to it. the scanning is done with #! /bin/bash cat wtmp | strings | egrep -o "+\.+\.+\." | sort -u... (6 Replies)
Discussion started by: rocketkids
6 Replies

2. Shell Programming and Scripting

regex question

I have a simple file test.out that contains data in the form of key1=A|shift1 key2=B|shift2 key3=C|shift3 and so on. I need to get it to print A B C I can do it using lookbehind assertion such as this ( ?<==)() yet I was wondering if there is another way of mutching single... (8 Replies)
Discussion started by: arushunter
8 Replies

3. Shell Programming and Scripting

regex question

Hi I have a question on regex There is a line in a script like my_file="$(echo SunMonTueWed | sed "s//_&g") " My question what does the expression _&g do. Obviously in this example the output is _Sun_Mon_Tue_Wed Another question can i use some trick to get the result like... (3 Replies)
Discussion started by: xiamin
3 Replies

4. Shell Programming and Scripting

regex question

Hi, im sure this is really simple but i cant quite figure it out. how do i test against a word at the beginning of the line but up to the point of a delimiter i.e. ":" for example if i wanted to test against the user in the /etc/passwd file peter:x:101:100:peters account:/var/peter:/bin/sh ... (3 Replies)
Discussion started by: hcclnoodles
3 Replies

5. UNIX for Dummies Questions & Answers

regex question

I have dates in mm/dd/yy format that I wish to convert to yy-mm-dd format. ()/()/() finds them, but when I try to replace with $3-$1-$2 both kate and kwrite treat it as a text literal. (2 Replies)
Discussion started by: porphyry5
2 Replies

6. Shell Programming and Scripting

RegEX question

Hi, I am trying to write a regex for myscript and need some input from experts. here is what I must grep for TICKET{Sapce}{Space}{hyphen} so here is the example data TICKET 34554, CT-12345, TICKET 12345: some text here TICKET 2342, CT-12345, MA-12344: some text here TICKET... (5 Replies)
Discussion started by: rider29
5 Replies

7. Shell Programming and Scripting

regex question

Hi guys, I have a file in the following format: cmpr5551 cmpr6002 cmpr93 anne 5454 bbro 434 cmprsvc cmprsvc7 ffgi55 vefe99 cmprsvc8 cmprsvc9 I need to "grep" only the entries which start with "cmpr" followed by the number. All other entries should be excluded. I was trying to use... (3 Replies)
Discussion started by: aoussenko
3 Replies

8. Shell Programming and Scripting

regex question

Hi guys, I am trying to "grep" or "egrep" the following entry out of the file using regex: MACCDB1 or MACCDB2 The problem is that the file might contain other entries which start with "MACCDB" string. I was trying to use regex to "grep" the exact pattern but it fails to output the correct... (2 Replies)
Discussion started by: aoussenko
2 Replies

9. Shell Programming and Scripting

Regex Question

Hi I am trying to match lines having following string BIND dn="uid= putting something like this is not working : /\sBIND dn="uid=/ Any suggestion. Thanks. John (9 Replies)
Discussion started by: john_prince
9 Replies

10. Shell Programming and Scripting

Regex question

I want to match all occurrence of 01,03,05,07,10,11 at 9th and 10th position of a string . I tried the following but its also matching characters like 33 or 11 on 9th and 10th position . sed "/^\{8\}00/d" A.TXT 000000001000 433483433339 <<< wrong 121121211100 <<< wrong 167710000110... (10 Replies)
Discussion started by: boncuk
10 Replies
thai/wtt.h(3)							      libthai							     thai/wtt.h(3)

NAME
thai/wtt.h - WTT I/O implementation. SYNOPSIS
Enumerations enum WTTClass { CTRL = 0, NON = 1, CONS = 2, LV = 3, FV1 = 4, FV2 = 5, FV3 = 6, BV1 = 7, BV2 = 8, BD = 9, TONE = 10, AD1 = 11, AD2 = 12, AD3 = 13, AV1 = 14, AV2 = 15, AV3 = 16 } Classification of characters in TIS620 according to WTT. enum WTTOp { CP = 1, XC = 2, AC = 3, RJ = 4, SR = 5 } Composibility checking tables. Functions WTTClass TACchtype (thchar_t c) WTT character class. WTTOp TACio_op (thchar_t c1, thchar_t c2) WTT I/O operation. Detailed Description WTT I/O implementation. WTT stands for Wing Tuk Tee (in Thai, Runs everywhere). It was defined by TACTIS (Thai API Consortium/Thai Industrial Standard) in the NECTEC Thai Software Standard Project (1989-1991), and later endorsed by Thai Industrial Standard Institute (TISI) as TIS 1566-2541 in 1998. WTT classifies Thai chracter(TIS-620) into 17 types below. ITYPE VALUE SHORT_DESCRIPTION CTRL 0 control characters NON 1 non composible characters CONS 2 consonants LV 3 leading vowels FV1 4 following vowels 1 FV2 5 following vowels 2 FV3 6 following vowels 3 BV1 7 below vowels 1 BV2 8 below vowels 2 BD 9 below diacritics TONE 10 tonemarks AD1 11 above diacritics 1 AD2 12 above diacritics 2 AD3 13 above diacritics 3 AV1 14 above vowels 1 AV2 15 above vowels 2 AV3 16 above vowels 3 Functions in thctype.h do basic character classifications while wtt.h classifies a chracter in detail. Please refer to the reference. TACio_op() checks how to compose two given chracters. The possiblities are Composible (CP), Non-display (XC), Accept (AC), Reject (RJ) and Strict Reject (SR). The values of CP, XC, AC, RJ and SR are difined in wtt.h. And their meanings are: o CP : second character is displayed in the same cell as the first, also implies an acceptance. o XC : Do nothing. o AC : Display second character in the next cell. o RJ : Discard second character. o SR : Reject second character only in strict mode. Enumeration Type Documentation enum WTTClass Classification of characters in TIS620 according to WTT. Enumerator CTRL control chars NON non composibles CONS consonants LV leading vowels FV1 following vowels 1 FV2 following vowels 2 FV3 following vowels 3 BV1 below vowels 1 BV2 below vowels 2 BD below diacritics TONE tonemarks AD1 above diacritics 1 AD2 above diacritics 2 AD3 above diacritics 3 AV1 above vowels 1 AV2 above vowels 2 AV3 above vowels 3 enum WTTOp Composibility checking tables. Enumerator CP COMPOSIBLE - following char is displayed in the same cell as leading char, also implies ACCEPT XC Non-display AC ACCEPT - display the following char in the next cell RJ REJECT - discard that following char, ignore it SR STRICT REJECT - REJECT only if in strict mode Function Documentation WTTClass TACchtype (thchar_tc) WTT character class. Parameters: c : the character Returns: WTT character class { CTRL, ..., AV3 } WTTOp TACio_op (thchar_tc1, thchar_tc2) WTT I/O operation. Parameters: c1 : previous character c2 : next character Returns: WTT I/O operation { CP, XC, AC, RJ, SR } Author Generated automatically by Doxygen for libthai from the source code. Version 0.1.14 Tue Jun 17 2014 thai/wtt.h(3)
All times are GMT -4. The time now is 07:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy