Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] regex makes no sense. example doesn't work
#1
Hi,

I've tried to figure this out for the past two hours and I can't take it anymore. I don't get this at all.

<!--987987-->

I'm trying to get the result, 987987 - basicaly the stuff in the middle.

regexpattern =
;<!--(.*)-->

I tried changing the pattern to just --(.*)--

tempvar is str that holds data to search
uniqueidcode I tried to declare this a str and int. neither works.

if(0=findrx(tempvar regexpattern uniqueidcode)) end "not found"

when this works it spits out a single character. Most of the time it gives us me 0.

Thanks for reading.

ps I did read the help file. I did try the example and I can't make that work either. I googled and it suggested the same solution.

Find digits (10)
str subject="abc10 100 def"
out findrx(subject "\d+")

That outputs a single digit - the position of the first digit. I expected this to output all digits.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)