The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Searching all files that contain pattern ravi.sadani19 Shell Programming and Scripting 4 11-29-2008 06:52 PM
Pattern searching pattern in c files murthybptl Shell Programming and Scripting 6 11-17-2007 09:15 AM
Regarding Searching Pattern sbasetty Shell Programming and Scripting 2 09-29-2006 05:49 PM
How to use cat command in sed pattern searching Sona UNIX for Dummies Questions & Answers 4 08-22-2006 09:05 AM
Searching for a pattern in a Directory gandhevinod Filesystems, Disks and Memory 1 02-25-2005 08:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-16-2002
giannicello giannicello is offline
Registered User
  
 

Join Date: Sep 2001
Location: Phoenix
Posts: 169
pattern searching using C

i think grep can only find char in files matching a pattern without any wildcards like ? correct? It works with * but not ?.

how can i write a small c program to find words in a file, like a list, that matches a pattern like ma?y, b??con, etc if grep doesn't understand ? in a pattern search. if this is the case even b*con if I wanted to write my own pattern search funtion? I tried to use \? but didn't help in my search.

thanks.
  #2 (permalink)  
Old 04-16-2002
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,668
With egrep you can use regular expressions.


There is also command line PERL .
Closed Thread

Bookmarks

Tags
regex, regular expressions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0