Recent

Author Topic: Regular Expression  (Read 1846 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
Regular Expression
« on: June 09, 2015, 10:37:12 am »
Hello guys, I'm completely ignorant of regular expressions.
Who tells me how to read this type of string from a longer text ?!

<b><span class=\"class_pp\">1,33&nbsp;<span class=\"sm\">EUR<\/span>

Thanks
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

parcel

  • Full Member
  • ***
  • Posts: 145
Re: Regular Expression
« Reply #1 on: June 09, 2015, 10:45:56 am »
How about this?

Code: [Select]
expression <b><span class=\\"class_pp\\">([^<]+)<span class=\\"sm\\">([^<]+)<\\/span>


xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
Re: Regular Expression
« Reply #2 on: June 09, 2015, 12:54:38 pm »
Perfect.  :)
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018