regexp

Results 1 to 4 of 4

Thread: regexp

  1. #1
    Join Date
    Dec 1969
    Posts
    402

    Default regexp

    is it possible to distinguish between say 1) 'ABC.ATIME.DEF' and 2) 'TIME', so that 1) would not be picked up when searching for 'TIME' using regexp ?

  2. #2
    Join Date
    Dec 1969
    Posts
    16,931

    Default RE: regexp

    Depends. Can you define exactly WHEN to match "TIME" and when NOT to match "TIME"?<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969
    Posts
    402

    Default RE: regexp

    hmmm.. the problem is that i am searching through programs for variable names. therefore &#039;(var&#039; is ok but &#039;(another-var&#039; isn&#039;t.

  4. #4
    Join Date
    Dec 1969
    Posts
    16,931

    Default RE: regexp

    So, define it.<BR><BR>Well, you want to search for "y" when it&#039;s followed, and preceeded, by a non-alphanumeric character OR an operator (=-/*+.?:)...?<BR><BR>Ok, that&#039;s a start. I&#039;m not particuarly good with regular expressions, but the only way you can even START to write one is to sit down and logically work out what you have to match.<BR><BR>Craig.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •