Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1334 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

perl tricky pattern matching

Thread title: perl tricky pattern matching
Closed Thread    
    Thread tools Search this thread Display Modes  
05-13-2006, 10:47 AM
#1
ktsirig is offline ktsirig
Status: Junior Member
Join date: Oct 2005
Location:
Expertise:
Software:
 
Posts: 46
iTrader: 0 / 0%
 

ktsirig is on a distinguished road

  Old  perl tricky pattern matching

Hi all!
Suppose you have the following string of letters :

$string ='LPSTEOPRTRYERTRETR';
and you want to search for the following pattern inside the string:
$pattern= LP[SKTAQEHLDN][TA][GN][EDASTV] =>5/6
By saying 5/6, I mean that you can have one mismatch but still it must return success.
If you check the string above, it has L, P, S, T and then E. There is no G in the pattern, but I am ok with it...
So, my question is how can you set a threshold in pattern matching above which you will return success...

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed