Textstring within a RegExp

Results 1 to 2 of 2

Thread: Textstring within a RegExp

  1. #1
    Join Date
    Dec 1969

    Default Textstring within a RegExp

    I&#039;m searching through an HTML-file with regular expressions after certain things, and it works great - except for one thing.<BR>I need to combine a regular expression with a textstring. So that it uses both a bunch of regular expressions combined with textstrings that contain special characters tha are not supposed to be enterpered like for instance:<BR>s*?&#060;as{1,3}href=.*?&#062;Asus 40x16x24x CD-RW+ (Burn Proof)&#060;.*?&#062;<BR><BR>In this case, it would be the "Asus 40x16x24x CD-RW+ (Burn Proof)" that isn&#039;t supposed to be enterperted at all, but just be searced for like an ordinary InStr-searchstring.<BR>Is this possible to do, or do I have to first find all occurances of the RexExp-pattern, and then check if the string is directly efterwards for every found occurance (or write code that encodes the string into a RegExp-pattern) ?

  2. #2
    Join Date
    Dec 1969

    Default RE: Textstring within a RegExp

    To find this string:<BR><BR>Asus 40x16x24x CD-RW+ (Burn Proof)<BR><BR>You&#039;ll need to use this pattern:<BR><BR>Asus 40x16x24x CD-RW+ (Burn Proof)<BR><BR>Because "-", "+", "(", and ")" are special characters for a RegExp engine.

Posting Permissions

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